Anystory
AnyStory是一種用於個性化主體生成的統一方法,能夠為單主體和多主體實現高保真的個性化。
下載量 299
發布時間 : 4/30/2025
模型概述
AnyStory是一種統一的個性化主體生成方法,能夠為單主體和多主體實現高保真的個性化,且在多主體個性化過程中不會犧牲主體的保真度。
模型特點
統一的個性化主體生成
能夠為單主體和多主體實現高保真的個性化。
多主體保真度
在多主體個性化過程中,不會犧牲主體的保真度。
故事板生成
支持生成連貫的故事板圖像。
模型能力
單主體個性化圖像生成
多主體個性化圖像生成
故事板圖像生成
風格化圖像生成
使用案例
創意內容生成
智能創作AI故事圖片
結合Qwen Agent進行智能創作,生成連貫的故事圖片。
生成具有一致風格和主題的系列圖像。
AI動畫視頻製作
結合Wan圖像到視頻工具進行動畫視頻製作。
生成可用於動畫視頻的個性化圖像序列。
🚀 AnyStory:文本到圖像生成中實現統一的單主體和多主體個性化
AnyStory是一種用於個性化主體生成的統一方法。它不僅能為單主體實現高保真的個性化,還能為多主體實現這一目標,且不會犧牲主體的保真度。
這個模型倉庫是關於 AnyStory 的。

✨ 主要特性
AnyStory是一種統一的個性化主體生成方法,具備以下特點:
- 能夠為單主體和多主體實現高保真的個性化。
- 在多主體個性化過程中,不會犧牲主體的保真度。
📦 安裝指南
文檔中未提及具體安裝步驟,暫不提供。
💻 使用示例
基礎用法
import torch
from PIL import Image
from huggingface_hub import hf_hub_download
from anystory.generate import AnyStoryFluxPipeline
anystory_path = hf_hub_download(repo_id="Junjie96/AnyStory", filename="anystory_flux.bin")
story_pipe = AnyStoryFluxPipeline(
hf_flux_pipeline_path="black-forest-labs/FLUX.1-dev",
hf_flux_redux_path="black-forest-labs/FLUX.1-Redux-dev",
anystory_path=anystory_path,
device="cuda",
torch_dtype=torch.bfloat16
)
# you can add lora here
# story_pipe.flux_pipeline.load_lora_weights(lora_path, adapter_name="...")
# single-subject
subject_image = Image.open("assets/examples/1.webp").convert("RGB")
subject_mask = Image.open("assets/examples/1_mask.webp").convert("L")
prompt = "Cartoon style. A sheep is riding a skateboard and gliding through the city," \
" holding a wooden sign that says \"hello\"."
image = story_pipe.generate(prompt=prompt, images=[subject_image], masks=[subject_mask], seed=2025,
num_inference_steps=25, height=512, width=512,
guidance_scale=3.5)
image.save("output_1.png")
# multi-subject
subject_image_1 = Image.open("assets/examples/6_1.webp").convert("RGB")
subject_mask_1 = Image.open("assets/examples/6_1_mask.webp").convert("L")
subject_image_2 = Image.open("assets/examples/6_2.webp").convert("RGB")
subject_mask_2 = Image.open("assets/examples/6_2_mask.webp").convert("L")
prompt = "Two men are sitting by a wooden table, which is laden with delicious food and a pot of wine. " \
"One of the men holds a wine glass, drinking heartily with a bold expression; " \
"the other smiles as he pours wine for his companion, both of them engaged in cheerful conversation. " \
"In the background is an ancient pavilion surrounded by emerald bamboo groves, with sunlight filtering " \
"through the leaves to cast dappled shadows."
image = story_pipe.generate(prompt=prompt,
images=[subject_image_1, subject_image_2],
masks=[subject_mask_1, subject_mask_2],
seed=2025,
enable_router=True, ref_start_at=0.09,
num_inference_steps=25, height=512, width=512,
guidance_scale=3.5)
image.save("output_2.png")
故事板生成
import json
from storyboard import StoryboardPipeline
storyboard_pipe = StoryboardPipeline()
storyboard_pipe.new_story()
script_dict = json.load(open("assets/scripts/013420.json"))
print(script_dict)
results = storyboard_pipe(script_dict, style_name="Comic book")
for key, result in results.items():
result.save(f"output_1_{key}.png")
# 狮子王辛巴成长
storyboard_pipe.new_story()
script_dict = json.load(open("assets/scripts/014933.json"))
print(script_dict)
results = storyboard_pipe(script_dict, style_name="Japanese Anime")
for key, result in results.items():
result.save(f"output_2_{key}.png")
示例輸出:


📚 詳細文檔
應用場景
- 智能創作AI故事圖片:可結合 Qwen Agent 進行智能創作(請參考
storyboard.py
)。 - AI動畫視頻製作:可結合 Wan 圖像到視頻工具進行製作(請參考
assets/example_videos
)。
🔧 技術細節
文檔中未提及具體技術細節,暫不提供。
📄 許可證
本項目使用 apache-2.0
許可證。
👏 致謝
此代碼基於 diffusers 和 OminiControl 構建。非常感謝他們的傑出工作!
📖 引用
@article{he2025anystory,
title={AnyStory: Towards Unified Single and Multiple Subject Personalization in Text-to-Image Generation},
author={He, Junjie and Tuo, Yuxiang and Chen, Binghui and Zhong, Chongyang and Geng, Yifeng and Bo, Liefeng},
journal={arXiv preprint arXiv:2501.09503},
year={2025}
}
📋 模型信息
屬性 | 詳情 |
---|---|
基礎模型 | black-forest-labs/FLUX.1-dev |
語言 | en |
庫名稱 | diffusers |
許可證 | apache-2.0 |
任務類型 | 文本到圖像 |
項目頁面 | https://aigcdesigngroup.github.io/AnyStory/ |
📢 最新消息
- [2025/05/01] 我們發佈了 AnyStory 的
FLUX.1-dev
版本的代碼和演示。
Stable Diffusion V1 5
Openrail
穩定擴散是一種潛在的文本到圖像擴散模型,能夠根據任何文本輸入生成逼真的圖像。
圖像生成
S
stable-diffusion-v1-5
3.7M
518
Stable Diffusion Inpainting
Openrail
基於穩定擴散的文本到圖像生成模型,具備圖像修復能力
圖像生成
S
stable-diffusion-v1-5
3.3M
56
Stable Diffusion Xl Base 1.0
SDXL 1.0是基於擴散的文本生成圖像模型,採用專家集成的潛在擴散流程,支持高分辨率圖像生成
圖像生成
S
stabilityai
2.4M
6,545
Stable Diffusion V1 4
Openrail
穩定擴散是一種潛在文本到圖像擴散模型,能夠根據任意文本輸入生成逼真圖像。
圖像生成
S
CompVis
1.7M
6,778
Stable Diffusion Xl Refiner 1.0
SD-XL 1.0優化器模型是Stability AI開發的圖像生成模型,專為提升SDXL基礎模型生成的圖像質量而設計,特別擅長最終去噪步驟處理。
圖像生成
S
stabilityai
1.1M
1,882
Stable Diffusion 2 1
基於擴散的文本生成圖像模型,支持通過文本提示生成和修改圖像
圖像生成
S
stabilityai
948.75k
3,966
Stable Diffusion Xl 1.0 Inpainting 0.1
基於Stable Diffusion XL的潛在文本到圖像擴散模型,具備通過遮罩進行圖像修復的功能
圖像生成
S
diffusers
673.14k
334
Stable Diffusion 2 Base
基於擴散的文生圖模型,可根據文本提示生成高質量圖像
圖像生成
S
stabilityai
613.60k
349
Playground V2.5 1024px Aesthetic
其他
開源文生圖模型,能生成1024x1024分辨率及多種縱橫比的美學圖像,在美學質量上處於開源領域領先地位。
圖像生成
P
playgroundai
554.94k
723
Sd Turbo
SD-Turbo是一款高速文本生成圖像模型,僅需單次網絡推理即可根據文本提示生成逼真圖像。該模型作為研究原型發佈,旨在探索小型蒸餾文本生成圖像模型。
圖像生成
S
stabilityai
502.82k
380
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98