File size: 6,241 Bytes
edbb91f 9cb4976 faa2ac4 a7e7a08 3f25ef8 a7e7a08 8274bbd a7e7a08 edbb91f 8a71ae4 97b31f8 8a71ae4 2362015 8a71ae4 a7e7a08 8a71ae4 a7e7a08 8a71ae4 edbb91f 8a71ae4 86b50c2 8a71ae4 db95d4e 8a71ae4 db95d4e 6a3d89c 8a71ae4 d81a32d db95d4e 8a71ae4 db95d4e 8a71ae4 7a0bb4a 8a71ae4 edbb91f 8a71ae4 edbb91f 8a71ae4 edbb91f 8a71ae4 821c5cb 8a71ae4 edbb91f 8a71ae4 edbb91f 8a71ae4 bfd53d4 edbb91f 8a71ae4 bfd53d4 edbb91f a7e7a08 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | ---
license: other
license_name: flux-1-dev-non-commercial-license
license_link: LICENSE.md
library_name: diffusers
language:
- en
- ml
base_model:
- black-forest-labs/FLUX.1-dev
pipeline_tag: text-to-image
tags:
- art
- diffusion
- aesthetic-poster-generation
---
<div align="center">
<h1>π¨ PosterCraft:<br/>Rethinking High-Quality Aesthetic Poster Generation in a Unified Framework</h1>
[](https://arxiv.org/abs/2506.10741)
[](https://github.com/ephemeral182/PosterCraft)
[](https://huggingface.co/PosterCraft)
[](https://ephemeral182.github.io/PosterCraft/)
[](https://www.youtube.com/watch?v=92wMU4D7qx0)
[](https://huggingface.co/spaces/Ephemeral182/PosterCraft)
<img src="assets/logo2.png" alt="PosterCraft Logo" width="1000"/>
<img src="assets/teaser-1.png" alt="PosterCraft Logo" width="1000"/>
</div>
---
## π What is PosterCraft?
<div align="center">
<img src="assets/demo2.png" alt="What is PosterCraft - Quick Prompt Demo" width="1000"/>
<br>
</div>
PosterCraft is a unified framework for **high-quality aesthetic poster generation** that excels in **precise text rendering**, **seamless integration of abstract art**, **striking layouts**, and **stylistic harmony**.
## π Quick Start
### π§ Installation
```bash
# Clone the repository
git clone https://github.com/ephemeral182/PosterCraft.git
cd PosterCraft
# Create conda environment
conda create -n postercraft python=3.11
conda activate postercraft
# Install dependencies
pip install -r requirements.txt
```
### π Easy Usage
PosterCraft is designed as a unified and flexible framework. This makes it easy to use PosterCraft within your own custom workflows or other compatible frameworks.
Loading the model is straightforward:
```python
import torch
from diffusers import FluxPipeline, FluxTransformer2DModel
# 1. Define model IDs and settings
pipeline_id = "black-forest-labs/FLUX.1-dev"
postercraft_transformer_id = "PosterCraft/PosterCraft-v1_RL"
device = "cuda"
dtype = torch.bfloat16
# 2. Load the base pipeline
pipe = FluxPipeline.from_pretrained(pipeline_id, torch_dtype=dtype)
# 3. The key step: simply replace the original transformer with our fine-tuned PosterCraft model
pipe.transformer = FluxTransformer2DModel.from_pretrained(
postercraft_transformer_id,
torch_dtype=dtype
)
pipe.to(device)
# Now, `pipe` is a standard diffusers pipeline ready for inference with your own logic.
```
### π Quick Generation
For the best results and to leverage our intelligent prompt rewriting feature, we recommend using the provided `inference.py` script. This script automatically enhances your creative ideas for optimal results.
Generate high-quality aesthetic posters from your prompt with `BF16` precision, please refer to our [GitHub repository](https://github.com/Ephemeral182/PosterCraft) :
```bash
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"
```
If you are running on a GPU with limited memory, you can use `inference_offload.py` to offload some components to the CPU:
```bash
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
We provide a Gradio web UI for PosterCraft, please refer to our [GitHub repository](https://github.com/Ephemeral182/PosterCraft).
```bash
python demo_gradio.py
```
## π Performance Benchmarks
<div align="center">
### π Quantitative Results
<table>
<thead>
<tr>
<th>Method</th>
<th>Text Recall β</th>
<th>Text F-score β</th>
<th>Text Accuracy β</th>
</tr>
</thead>
<tbody>
<tr>
<td style="white-space: nowrap;">OpenCOLE (Open)</td>
<td>0.082</td>
<td>0.076</td>
<td>0.061</td>
</tr>
<tr>
<td style="white-space: nowrap;">Playground-v2.5 (Open)</td>
<td>0.157</td>
<td>0.146</td>
<td>0.132</td>
</tr>
<tr>
<td style="white-space: nowrap;">SD3.5 (Open)</td>
<td>0.565</td>
<td>0.542</td>
<td>0.497</td>
</tr>
<tr>
<td style="white-space: nowrap;">Flux1.dev (Open)</td>
<td>0.723</td>
<td>0.707</td>
<td>0.667</td>
</tr>
<tr>
<td style="white-space: nowrap;">Ideogram-v2 (Close)</td>
<td>0.711</td>
<td>0.685</td>
<td>0.680</td>
</tr>
<tr>
<td style="white-space: nowrap;">BAGEL (Open)</td>
<td>0.543</td>
<td>0.536</td>
<td>0.463</td>
</tr>
<tr>
<td style="white-space: nowrap;">Gemini2.0-Flash-Gen (Close)</td>
<td>0.798</td>
<td>0.786</td>
<td>0.746</td>
</tr>
<tr>
<td style="white-space: nowrap;"><b>PosterCraft (ours)</b></td>
<td><b>0.787</b></td>
<td><b>0.774</b></td>
<td><b>0.735</b></td>
</tr>
</tbody>
</table>
<img src="assets/hpc.png" alt="hpc" width="1000"/>
</div>
---
## π Citation
If you find PosterCraft useful for your research, please cite our paper:
```bibtex
@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}
}
```
</div> |