🚀 PosterCraft:在统一框架中重新思考高质量美学海报生成
PosterCraft是一个用于高质量美学海报生成的统一框架,它在精确文本渲染、抽象艺术无缝融合、醒目布局和风格协调方面表现出色,为海报设计带来了新的解决方案和价值。
🚀 快速开始
📦 安装指南
git clone https://github.com/ephemeral182/PosterCraft.git
cd PosterCraft
conda create -n postercraft python=3.11
conda activate postercraft
pip install -r requirements.txt
💻 使用示例
基础用法
import torch
from diffusers import FluxPipeline, FluxTransformer2DModel
pipeline_id = "black-forest-labs/FLUX.1-dev"
postercraft_transformer_id = "PosterCraft/PosterCraft-v1_RL"
device = "cuda"
dtype = torch.bfloat16
pipe = FluxPipeline.from_pretrained(pipeline_id, torch_dtype=dtype)
pipe.transformer = FluxTransformer2DModel.from_pretrained(
postercraft_transformer_id,
torch_dtype=dtype
)
pipe.to(device)
快速生成
为了获得最佳效果并利用我们的智能提示重写功能,我们建议使用提供的 inference.py
脚本。该脚本会自动优化你的创意想法以获得最佳效果。
使用 BF16
精度从你的提示生成高质量美学海报,请参考我们的 GitHub仓库:
python inference.py \
--prompt "Urban Canvas Street Art Expo poster with bold graffiti-style lettering and dynamic colorful splashes" \
--enable_recap \
--num_inference_steps 28 \
--guidance_scale 3.5 \
--seed 42 \
--pipeline_path "black-forest-labs/FLUX.1-dev" \
--custom_transformer_path "PosterCraft/PosterCraft-v1_RL" \
--qwen_model_path "Qwen/Qwen3-8B"
如果你在内存有限的GPU上运行,可以使用 inference_offload.py
将一些组件卸载到CPU:
python inference_offload.py \
--prompt "Urban Canvas Street Art Expo poster with bold graffiti-style lettering and dynamic colorful splashes" \
--enable_recap \
--num_inference_steps 28 \
--guidance_scale 3.5 \
--seed 42 \
--pipeline_path "black-forest-labs/FLUX.1-dev" \
--custom_transformer_path "PosterCraft/PosterCraft-v1_RL" \
--qwen_model_path "Qwen/Qwen3-8B"
Gradio Web UI
我们为PosterCraft提供了一个Gradio Web UI,请参考我们的 GitHub仓库。
python demo_gradio.py
✨ 主要特性
PosterCraft是一个用于高质量美学海报生成的统一框架,在精确文本渲染、抽象艺术的无缝融合、醒目布局和风格协调方面表现出色。
📚 详细文档
性能基准
定量结果
方法 |
文本召回率 |
文本F值 |
文本准确率 |
OpenCOLE (Open) |
0.082 |
0.076 |
0.061 |
Playground-v2.5 (Open) |
0.157 |
0.146 |
0.132 |
SD3.5 (Open) |
0.565 |
0.542 |
0.497 |
Flux1.dev (Open) |
0.723 |
0.707 |
0.667 |
Ideogram-v2 (Close) |
0.711 |
0.685 |
0.680 |
BAGEL (Open) |
0.543 |
0.536 |
0.463 |
Gemini2.0-Flash-Gen (Close) |
0.798 |
0.786 |
0.746 |
PosterCraft (我们的方法) |
0.787 |
0.774 |
0.735 |

📄 许可证
本项目使用 flux-1-dev-non-commercial-license 许可证。
📋 引用
如果你发现PosterCraft对您的研究有用,请引用我们的论文:
@article{chen2025postercraft,
title={PosterCraft: Rethinking High-Quality Aesthetic Poster Generation in a Unified Framework},
author={Chen, Sixiang and Lai, Jianyu and Gao, Jialin and Ye, Tian and Chen, Haoyu and Shi, Hengyu and Shao, Shitong and Lin, Yunlong and Fei, Song and Xing, Zhaohu and Jin, Yeying and Luo, Junfeng and Wei, Xiaoming and Zhu, Lei},
journal={arXiv preprint arXiv:2506.10741},
year={2025}
}