jimmycarter
commited on
Model card auto-generated by SimpleTuner
Browse files
README.md
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
base_model: "black-forest-labs/FLUX.1-dev"
|
4 |
+
tags:
|
5 |
+
- flux
|
6 |
+
- flux-diffusers
|
7 |
+
- text-to-image
|
8 |
+
- diffusers
|
9 |
+
- simpletuner
|
10 |
+
- lora
|
11 |
+
- template:sd-lora
|
12 |
+
inference: true
|
13 |
+
widget:
|
14 |
+
- text: 'unconditional (blank prompt)'
|
15 |
+
parameters:
|
16 |
+
negative_prompt: 'blurry, cropped, ugly'
|
17 |
+
output:
|
18 |
+
url: ./assets/image_0_0.png
|
19 |
+
- text: 'Dr. Seuss during a book signing event, seated at a table with an open book and pen in hand, his characteristic white beard, clear-rimmed glasses, and whimsical bow tie complementing his calm, attentive expression, all within the literary setting of a bookstore, reflecting his enduring connection with readers and the joy his work brought to many.'
|
20 |
+
parameters:
|
21 |
+
negative_prompt: 'blurry, cropped, ugly'
|
22 |
+
output:
|
23 |
+
url: ./assets/image_1_0.png
|
24 |
+
- text: 'Anime picture of famed author Dr. Seuss in a Studio Ghibli style'
|
25 |
+
parameters:
|
26 |
+
negative_prompt: 'blurry, cropped, ugly'
|
27 |
+
output:
|
28 |
+
url: ./assets/image_2_0.png
|
29 |
+
- text: 'Dr. Seuss in a leather jacket riding a Harley Davidson Motorcycle'
|
30 |
+
parameters:
|
31 |
+
negative_prompt: 'blurry, cropped, ugly'
|
32 |
+
output:
|
33 |
+
url: ./assets/image_3_0.png
|
34 |
+
- text: 'Famous author Dr. Seuss holding a chainsaw while riding around on a unicycle, vintage TV still from the Dick Van Dyke show'
|
35 |
+
parameters:
|
36 |
+
negative_prompt: 'blurry, cropped, ugly'
|
37 |
+
output:
|
38 |
+
url: ./assets/image_4_0.png
|
39 |
+
- text: 'A photograph of Dr. Seuss riding in a horse-drawn carriage'
|
40 |
+
parameters:
|
41 |
+
negative_prompt: 'blurry, cropped, ugly'
|
42 |
+
output:
|
43 |
+
url: ./assets/image_5_0.png
|
44 |
+
---
|
45 |
+
|
46 |
+
# flux-training-seuss-lora
|
47 |
+
|
48 |
+
This is a standard PEFT LoRA derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
|
49 |
+
|
50 |
+
|
51 |
+
The main validation prompt used during training was:
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
```
|
56 |
+
A photograph of Dr. Seuss riding in a horse-drawn carriage
|
57 |
+
```
|
58 |
+
|
59 |
+
## Validation settings
|
60 |
+
- CFG: `3.5`
|
61 |
+
- CFG Rescale: `0.0`
|
62 |
+
- Steps: `15`
|
63 |
+
- Sampler: `None`
|
64 |
+
- Seed: `42`
|
65 |
+
- Resolution: `1024`
|
66 |
+
|
67 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
68 |
+
|
69 |
+
You can find some example images in the following gallery:
|
70 |
+
|
71 |
+
|
72 |
+
<Gallery />
|
73 |
+
|
74 |
+
The text encoder **was not** trained.
|
75 |
+
You may reuse the base model text encoder for inference.
|
76 |
+
|
77 |
+
|
78 |
+
## Training settings
|
79 |
+
|
80 |
+
- Training epochs: 33
|
81 |
+
- Training steps: 74
|
82 |
+
- Learning rate: 0.0003
|
83 |
+
- Effective batch size: 16
|
84 |
+
- Micro-batch size: 1
|
85 |
+
- Gradient accumulation steps: 16
|
86 |
+
- Number of GPUs: 1
|
87 |
+
- Prediction type: flow-matching
|
88 |
+
- Rescaled betas zero SNR: False
|
89 |
+
- Optimizer: adamw_bf16
|
90 |
+
- Precision: bf16
|
91 |
+
- Quantised: No
|
92 |
+
- Xformers: Not used
|
93 |
+
- LoRA Rank: 16
|
94 |
+
- LoRA Alpha: None
|
95 |
+
- LoRA Dropout: 0.1
|
96 |
+
- LoRA initialisation style: default
|
97 |
+
|
98 |
+
|
99 |
+
## Datasets
|
100 |
+
|
101 |
+
### default_dataset_arb
|
102 |
+
- Repeats: 0
|
103 |
+
- Total number of images: 4
|
104 |
+
- Total number of aspect buckets: 3
|
105 |
+
- Resolution: 1.5 megapixels
|
106 |
+
- Cropped: False
|
107 |
+
- Crop style: None
|
108 |
+
- Crop aspect: None
|
109 |
+
### default_dataset
|
110 |
+
- Repeats: 0
|
111 |
+
- Total number of images: 3
|
112 |
+
- Total number of aspect buckets: 1
|
113 |
+
- Resolution: 1.048576 megapixels
|
114 |
+
- Cropped: True
|
115 |
+
- Crop style: random
|
116 |
+
- Crop aspect: square
|
117 |
+
### default_dataset_512
|
118 |
+
- Repeats: 0
|
119 |
+
- Total number of images: 4
|
120 |
+
- Total number of aspect buckets: 1
|
121 |
+
- Resolution: 0.262144 megapixels
|
122 |
+
- Cropped: True
|
123 |
+
- Crop style: random
|
124 |
+
- Crop aspect: square
|
125 |
+
### default_dataset_576
|
126 |
+
- Repeats: 0
|
127 |
+
- Total number of images: 4
|
128 |
+
- Total number of aspect buckets: 1
|
129 |
+
- Resolution: 0.331776 megapixels
|
130 |
+
- Cropped: True
|
131 |
+
- Crop style: random
|
132 |
+
- Crop aspect: square
|
133 |
+
### default_dataset_640
|
134 |
+
- Repeats: 0
|
135 |
+
- Total number of images: 4
|
136 |
+
- Total number of aspect buckets: 1
|
137 |
+
- Resolution: 0.4096 megapixels
|
138 |
+
- Cropped: True
|
139 |
+
- Crop style: random
|
140 |
+
- Crop aspect: square
|
141 |
+
### default_dataset_704
|
142 |
+
- Repeats: 0
|
143 |
+
- Total number of images: 4
|
144 |
+
- Total number of aspect buckets: 1
|
145 |
+
- Resolution: 0.495616 megapixels
|
146 |
+
- Cropped: True
|
147 |
+
- Crop style: random
|
148 |
+
- Crop aspect: square
|
149 |
+
### default_dataset_768
|
150 |
+
- Repeats: 0
|
151 |
+
- Total number of images: 3
|
152 |
+
- Total number of aspect buckets: 1
|
153 |
+
- Resolution: 0.589824 megapixels
|
154 |
+
- Cropped: True
|
155 |
+
- Crop style: random
|
156 |
+
- Crop aspect: square
|
157 |
+
### default_dataset_832
|
158 |
+
- Repeats: 0
|
159 |
+
- Total number of images: 3
|
160 |
+
- Total number of aspect buckets: 1
|
161 |
+
- Resolution: 0.692224 megapixels
|
162 |
+
- Cropped: True
|
163 |
+
- Crop style: random
|
164 |
+
- Crop aspect: square
|
165 |
+
### default_dataset_896
|
166 |
+
- Repeats: 0
|
167 |
+
- Total number of images: 3
|
168 |
+
- Total number of aspect buckets: 1
|
169 |
+
- Resolution: 0.802816 megapixels
|
170 |
+
- Cropped: True
|
171 |
+
- Crop style: random
|
172 |
+
- Crop aspect: square
|
173 |
+
### default_dataset_960
|
174 |
+
- Repeats: 0
|
175 |
+
- Total number of images: 3
|
176 |
+
- Total number of aspect buckets: 1
|
177 |
+
- Resolution: 0.9216 megapixels
|
178 |
+
- Cropped: True
|
179 |
+
- Crop style: random
|
180 |
+
- Crop aspect: square
|
181 |
+
|
182 |
+
|
183 |
+
## Inference
|
184 |
+
|
185 |
+
|
186 |
+
```python
|
187 |
+
import torch
|
188 |
+
from diffusers import DiffusionPipeline
|
189 |
+
|
190 |
+
model_id = 'black-forest-labs/FLUX.1-dev'
|
191 |
+
adapter_id = 'jimmycarter/flux-training-seuss-lora'
|
192 |
+
pipeline = DiffusionPipeline.from_pretrained(model_id)
|
193 |
+
pipeline.load_lora_weights(adapter_id)
|
194 |
+
|
195 |
+
prompt = "A photograph of Dr. Seuss riding in a horse-drawn carriage"
|
196 |
+
|
197 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
198 |
+
image = pipeline(
|
199 |
+
prompt=prompt,
|
200 |
+
num_inference_steps=15,
|
201 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
202 |
+
width=1024,
|
203 |
+
height=1024,
|
204 |
+
guidance_scale=3.5,
|
205 |
+
).images[0]
|
206 |
+
image.save("output.png", format="PNG")
|
207 |
+
```
|
208 |
+
|