1Prompt1Story

byliutaoMIT长期未更新

用单个提示词就能让扩散模型生成前后一致的多图故事,无需额外训练或微调,解决文生图角色与场景不一致的问题。

🔥ICLR 2025 (Spotlight) One-Prompt-One-Story: Free-Lunch Consistent Text-to-Image Generation Using a Single Prompt

暂无版本322star40fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/byliutao/1Prompt1Story
cd 1Prompt1Story
conda create --name 1p1s python=3.10
conda activate 1p1s
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
pip install transformers==4.46.3
conda install -c conda-forge diffusers
pip install opencv-python scipy gradio==4.44.1 sympy==1.13.1
python main.py
硬件要求按 README 说明

README 未说明显存要求;安装命令指定 pytorch-cuda=12.1,需按设备选择对应 CUDA 版本,未提及 CPU 运行与 GPU 型号。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

用单个提示词实现一致性的文生图生成,免训练即可保持角色与场景连贯

用单个提示词就能让扩散模型生成前后一致的多图故事,无需额外训练或微调,解决文生图角色与场景不一致的问题。

核心能力

  • 用单个提示词生成多张主题一致的图像
  • 提供 main.py 推理与 app.py Gradio 交互界面
  • 附带 Consistory+ 基准与批量生成脚本
  • 提供 Jittor 版本实现

容易踩的坑

依赖版本需严格匹配,transformers 固定为 4.46.3、gradio 固定为 4.44.1、sympy 固定为 1.13.1;PyTorch 需按本机 CUDA 版本选择安装;README 未说明模型权重是否需额外下载。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Demo

    Key Features

    How To Use

    # Clone this repository
    $ git clone https://github.com/byliutao/1Prompt1Story
    
    # Go into the repository
    $ cd 1Prompt1Story
    
    ### Install dependencies ###
    $ conda create --name 1p1s python=3.10
    $ conda activate 1p1s
    # choose the right cuda version of your device
    $ conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia 
    $ pip install transformers==4.46.3  # or: conda install conda-forge::transformers 
    $ conda install -c conda-forge diffusers
    $ pip install opencv-python scipy gradio==4.44.1 sympy==1.13.1
    ### Install dependencies ENDs ###
    
    # Run infer code
    $ python main.py
    
    # Run gradio code
    $ python app.py
    
    # Run benchmark generation code
    $ python -m resource.gen_benchmark --save_dir ./result/benchmark --benchmark_path ./resource/consistory+.yaml
    

    License

    This project is licensed under the MIT License - see the LICENSE file for details.

    Citation

    If our work assists your research, feel free to give us a star ⭐ or cite us using:

    @inproceedings{
    liu2025onepromptonestory,
    title={One-Prompt-One-Story: Free-Lunch Consistent Text-to-Image Generation Using a Single Prompt},
    author={Tao Liu and Kai Wang and Senmao Li and Joost van de Weijer and Fhad Khan and Shiqi Yang and Yaxing Wang and Jian Yang and Mingming Cheng},
    booktitle={The Thirteenth International Conference on Learning Representations},
    year={2025},
    url={https://openreview.net/forum?id=cD1kl2QKv1}
    }
    

    Visualization

    Multi-Subject Generation

    Comparison with Other Models

    Long Story Image Generation