Update README.md
Browse files
README.md
CHANGED
@@ -1,12 +1,9 @@
|
|
1 |
---
|
2 |
license: other
|
3 |
-
license_name: flux-1-dev-non-commercial-license
|
4 |
license_link: LICENSE.md
|
5 |
library_name: diffusers
|
6 |
language:
|
7 |
-
-
|
8 |
-
base_model:
|
9 |
-
- black-forest-labs/FLUX.1-dev
|
10 |
pipeline_tag: text-to-image
|
11 |
tags:
|
12 |
- art
|
@@ -15,32 +12,36 @@ tags:
|
|
15 |
---
|
16 |
|
17 |
<div align="center">
|
18 |
-
<h1>π¨
|
19 |
|
20 |
-
[](https://huggingface.co/spaces/Ephemeral182/PosterCraft)
|
26 |
|
27 |
-
<img src="assets/logo2.png" alt="
|
28 |
|
29 |
-
<img src="assets/teaser-1.png" alt="
|
30 |
|
31 |
</div>
|
32 |
|
33 |
---
|
34 |
|
35 |
|
36 |
-
## π What is
|
37 |
|
38 |
<div align="center">
|
39 |
-
<img src="assets/demo2.png" alt="What is
|
40 |
<br>
|
41 |
</div>
|
42 |
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
|
46 |
## π Quick Start
|
@@ -49,12 +50,12 @@ PosterCraft is a unified framework for **high-quality aesthetic poster generatio
|
|
49 |
|
50 |
```bash
|
51 |
# Clone the repository
|
52 |
-
git clone https://github.com/
|
53 |
-
cd
|
54 |
|
55 |
# Create conda environment
|
56 |
-
conda create -n
|
57 |
-
conda activate
|
58 |
|
59 |
# Install dependencies
|
60 |
pip install -r requirements.txt
|
@@ -63,9 +64,11 @@ pip install -r requirements.txt
|
|
63 |
|
64 |
### π Easy Usage
|
65 |
|
66 |
-
|
|
|
|
|
|
|
67 |
|
68 |
-
Loading the model is straightforward:
|
69 |
|
70 |
```python
|
71 |
import torch
|
@@ -73,16 +76,16 @@ from diffusers import FluxPipeline, FluxTransformer2DModel
|
|
73 |
|
74 |
# 1. Define model IDs and settings
|
75 |
pipeline_id = "black-forest-labs/FLUX.1-dev"
|
76 |
-
|
77 |
device = "cuda"
|
78 |
dtype = torch.bfloat16
|
79 |
|
80 |
# 2. Load the base pipeline
|
81 |
pipe = FluxPipeline.from_pretrained(pipeline_id, torch_dtype=dtype)
|
82 |
|
83 |
-
# 3. The key step: simply replace the original transformer with our
|
84 |
pipe.transformer = FluxTransformer2DModel.from_pretrained(
|
85 |
-
|
86 |
torch_dtype=dtype
|
87 |
)
|
88 |
pipe.to(device)
|
@@ -93,19 +96,23 @@ pipe.to(device)
|
|
93 |
|
94 |
### π Quick Generation
|
95 |
|
96 |
-
For the best results
|
|
|
|
|
|
|
|
|
97 |
|
98 |
-
|
99 |
|
100 |
```bash
|
101 |
python inference.py \
|
102 |
-
--prompt "Urban Canvas Street Art Expo poster with bold graffiti
|
103 |
--enable_recap \
|
104 |
--num_inference_steps 28 \
|
105 |
--guidance_scale 3.5 \
|
106 |
--seed 42 \
|
107 |
--pipeline_path "black-forest-labs/FLUX.1-dev" \
|
108 |
-
--custom_transformer_path "
|
109 |
--qwen_model_path "Qwen/Qwen3-8B"
|
110 |
```
|
111 |
|
@@ -113,20 +120,20 @@ If you are running on a GPU with limited memory, you can use `inference_offload.
|
|
113 |
|
114 |
```bash
|
115 |
python inference_offload.py \
|
116 |
-
--prompt "Urban Canvas Street Art Expo poster with bold graffiti
|
117 |
--enable_recap \
|
118 |
--num_inference_steps 28 \
|
119 |
--guidance_scale 3.5 \
|
120 |
--seed 42 \
|
121 |
--pipeline_path "black-forest-labs/FLUX.1-dev" \
|
122 |
-
--custom_transformer_path "
|
123 |
--qwen_model_path "Qwen/Qwen3-8B"
|
124 |
```
|
125 |
|
126 |
|
127 |
### π» Gradio Web UI
|
128 |
|
129 |
-
We provide a Gradio web UI for
|
130 |
|
131 |
```bash
|
132 |
python demo_gradio.py
|
@@ -192,7 +199,7 @@ python demo_gradio.py
|
|
192 |
<td>0.746</td>
|
193 |
</tr>
|
194 |
<tr>
|
195 |
-
<td style="white-space: nowrap;"><b>
|
196 |
<td><b>0.787</b></td>
|
197 |
<td><b>0.774</b></td>
|
198 |
<td><b>0.735</b></td>
|
@@ -210,13 +217,12 @@ python demo_gradio.py
|
|
210 |
|
211 |
## π Citation
|
212 |
|
213 |
-
If you find
|
214 |
|
215 |
```bibtex
|
216 |
-
@article{
|
217 |
-
title={
|
218 |
-
author={
|
219 |
-
journal={arXiv preprint arXiv:2506.10741},
|
220 |
year={2025}
|
221 |
}
|
222 |
```
|
|
|
1 |
---
|
2 |
license: other
|
|
|
3 |
license_link: LICENSE.md
|
4 |
library_name: diffusers
|
5 |
language:
|
6 |
+
- enf
|
|
|
|
|
7 |
pipeline_tag: text-to-image
|
8 |
tags:
|
9 |
- art
|
|
|
12 |
---
|
13 |
|
14 |
<div align="center">
|
15 |
+
<h1>π¨ Imagine:<br/>Words To Visuals</h1>
|
16 |
|
17 |
+
[](https://github.com/skylinemusiccds/Imagine)
|
18 |
+
[](https://huggingface.co/Satyam-Singh)
|
19 |
+
<!--[](https://skylinemusiccds.github.io/Imagine/)
|
20 |
+
[](https://www.youtube.com/watch?v=92wMU4D7qx0)-->
|
21 |
+
[](https://huggingface.co/spaces/Satyam-Singh/Imagine)
|
|
|
22 |
|
23 |
+
<img src="assets/logo2.png" alt="Imagine Logo" width="1000"/>
|
24 |
|
25 |
+
<img src="assets/teaser-1.png" alt="Imagine Logo" width="1000"/>
|
26 |
|
27 |
</div>
|
28 |
|
29 |
---
|
30 |
|
31 |
|
32 |
+
## π What is Imagine?
|
33 |
|
34 |
<div align="center">
|
35 |
+
<img src="assets/demo2.png" alt="What is Imagine - Quick Prompt Demo" width="1000"/>
|
36 |
<br>
|
37 |
</div>
|
38 |
|
39 |
+
**Imagine** is an all-in-one framework for creating **visually stunning posters**, blending:
|
40 |
+
|
41 |
+
- **Precise and accurate text rendering**
|
42 |
+
- **Seamless integration of abstract art**
|
43 |
+
- **Bold, eye-catching layouts**
|
44 |
+
- **A cohesive and harmonious visual style**
|
45 |
|
46 |
|
47 |
## π Quick Start
|
|
|
50 |
|
51 |
```bash
|
52 |
# Clone the repository
|
53 |
+
git clone https://github.com/skylinemusiccds/Imagine.git
|
54 |
+
cd Imagine
|
55 |
|
56 |
# Create conda environment
|
57 |
+
conda create -n imagine python=3.11
|
58 |
+
conda activate imagine
|
59 |
|
60 |
# Install dependencies
|
61 |
pip install -r requirements.txt
|
|
|
64 |
|
65 |
### π Easy Usage
|
66 |
|
67 |
+
**Imagine** offers a **modular and adaptable framework** that seamlessly fits into custom workflows or interoperates with other compatible systems. Its design prioritizes ease of use and flexibility, making integration effortless.
|
68 |
+
|
69 |
+
|
70 |
+
Loading the model is quick and intuitive:
|
71 |
|
|
|
72 |
|
73 |
```python
|
74 |
import torch
|
|
|
76 |
|
77 |
# 1. Define model IDs and settings
|
78 |
pipeline_id = "black-forest-labs/FLUX.1-dev"
|
79 |
+
imagine_transformer_id = "Satyam-Singh/Imagine"
|
80 |
device = "cuda"
|
81 |
dtype = torch.bfloat16
|
82 |
|
83 |
# 2. Load the base pipeline
|
84 |
pipe = FluxPipeline.from_pretrained(pipeline_id, torch_dtype=dtype)
|
85 |
|
86 |
+
# 3. The key step: simply replace the original transformer with our Imagine model
|
87 |
pipe.transformer = FluxTransformer2DModel.from_pretrained(
|
88 |
+
imagine_transformer_id,
|
89 |
torch_dtype=dtype
|
90 |
)
|
91 |
pipe.to(device)
|
|
|
96 |
|
97 |
### π Quick Generation
|
98 |
|
99 |
+
For the best results, we recommend using the provided `inference.py` script, which includes our **intelligent prompt rewriting** feature. This enhancement automatically refines your input to generate more compelling and visually stunning results.
|
100 |
+
|
101 |
+
### Generate Posters with Precision
|
102 |
+
|
103 |
+
Create **high-quality aesthetic posters** from your prompt using `BF16` precision for improved performance and efficiency.
|
104 |
|
105 |
+
π Get started by visiting our [GitHub repository](https://github.com/skylinemusiccds/Imagine).
|
106 |
|
107 |
```bash
|
108 |
python inference.py \
|
109 |
+
--prompt "Urban Canvas Street Art Expo poster with bold graffiti lettering and vibrant, dynamic color splashes capturing the energy of street art." \
|
110 |
--enable_recap \
|
111 |
--num_inference_steps 28 \
|
112 |
--guidance_scale 3.5 \
|
113 |
--seed 42 \
|
114 |
--pipeline_path "black-forest-labs/FLUX.1-dev" \
|
115 |
+
--custom_transformer_path "Satyam-Singh/Imagine" \
|
116 |
--qwen_model_path "Qwen/Qwen3-8B"
|
117 |
```
|
118 |
|
|
|
120 |
|
121 |
```bash
|
122 |
python inference_offload.py \
|
123 |
+
--prompt "Urban Canvas Street Art Expo poster with bold graffiti lettering and vibrant, dynamic color splashes capturing the energy of street art." \
|
124 |
--enable_recap \
|
125 |
--num_inference_steps 28 \
|
126 |
--guidance_scale 3.5 \
|
127 |
--seed 42 \
|
128 |
--pipeline_path "black-forest-labs/FLUX.1-dev" \
|
129 |
+
--custom_transformer_path "Satyam-Singh/Imagine" \
|
130 |
--qwen_model_path "Qwen/Qwen3-8B"
|
131 |
```
|
132 |
|
133 |
|
134 |
### π» Gradio Web UI
|
135 |
|
136 |
+
We provide a Gradio web UI for Imagine, please refer to our [GitHub repository](https://github.com/skylinemusiccds/Imagine).
|
137 |
|
138 |
```bash
|
139 |
python demo_gradio.py
|
|
|
199 |
<td>0.746</td>
|
200 |
</tr>
|
201 |
<tr>
|
202 |
+
<td style="white-space: nowrap;"><b>Imagine (ours)</b></td>
|
203 |
<td><b>0.787</b></td>
|
204 |
<td><b>0.774</b></td>
|
205 |
<td><b>0.735</b></td>
|
|
|
217 |
|
218 |
## π Citation
|
219 |
|
220 |
+
If you find Imagine useful for your research, please cite our paper:
|
221 |
|
222 |
```bibtex
|
223 |
+
@article{LLaVA : !magine,
|
224 |
+
title={LLaVA Imagine: Words to Visuals},
|
225 |
+
author={Satyam Singh, UniVerse Ai},
|
|
|
226 |
year={2025}
|
227 |
}
|
228 |
```
|