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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
- not-for-all-audiences
|
11 |
+
- lora
|
12 |
+
- template:sd-lora
|
13 |
+
- lycoris
|
14 |
+
inference: true
|
15 |
+
widget:
|
16 |
+
- text: 'unconditional (blank prompt)'
|
17 |
+
parameters:
|
18 |
+
negative_prompt: 'blurry, cropped, ugly'
|
19 |
+
output:
|
20 |
+
url: ./assets/image_0_0.png
|
21 |
+
- text: 'a garfield waifu wearing an apron with a red sphere over her head that reads It is Time'
|
22 |
+
parameters:
|
23 |
+
negative_prompt: 'blurry, cropped, ugly'
|
24 |
+
output:
|
25 |
+
url: ./assets/image_1_0.png
|
26 |
+
- text: 'a void of fursuit furries hanging onto the edge of reality as they get sucked into a vortex'
|
27 |
+
parameters:
|
28 |
+
negative_prompt: 'blurry, cropped, ugly'
|
29 |
+
output:
|
30 |
+
url: ./assets/image_2_0.png
|
31 |
+
- text: 'furries congregate at walmart to teach about gelatin fountains to adult furries'
|
32 |
+
parameters:
|
33 |
+
negative_prompt: 'blurry, cropped, ugly'
|
34 |
+
output:
|
35 |
+
url: ./assets/image_3_0.png
|
36 |
+
- text: 'the furry church congregation looking up at a cinematic movie screen with text on it that reads MOOSE = PONY'
|
37 |
+
parameters:
|
38 |
+
negative_prompt: 'blurry, cropped, ugly'
|
39 |
+
output:
|
40 |
+
url: ./assets/image_4_0.png
|
41 |
+
- text: 'furry church congregation singing hymns while they look to a screen with lyrics on it that reads THE NEW FRONTIER OF PONY MODELS?'
|
42 |
+
parameters:
|
43 |
+
negative_prompt: 'blurry, cropped, ugly'
|
44 |
+
output:
|
45 |
+
url: ./assets/image_5_0.png
|
46 |
+
- text: 'a furry giving a TED talk with a screen in the background showing bullet points: - what furry means, and, - what furry does not mean'
|
47 |
+
parameters:
|
48 |
+
negative_prompt: 'blurry, cropped, ugly'
|
49 |
+
output:
|
50 |
+
url: ./assets/image_6_0.png
|
51 |
+
- text: 'a sugar bear named brownie plays basketball with lumps of poop'
|
52 |
+
parameters:
|
53 |
+
negative_prompt: 'blurry, cropped, ugly'
|
54 |
+
output:
|
55 |
+
url: ./assets/image_7_0.png
|
56 |
+
- text: 'A photo-realistic image of a cat'
|
57 |
+
parameters:
|
58 |
+
negative_prompt: 'blurry, cropped, ugly'
|
59 |
+
output:
|
60 |
+
url: ./assets/image_8_0.png
|
61 |
+
---
|
62 |
+
|
63 |
+
# flux-sfwbooru-3.5M-lokr-attempt2
|
64 |
+
|
65 |
+
This is a LyCORIS adapter derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
|
66 |
+
|
67 |
+
|
68 |
+
The main validation prompt used during training was:
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
+
```
|
73 |
+
A photo-realistic image of a cat
|
74 |
+
```
|
75 |
+
|
76 |
+
## Validation settings
|
77 |
+
- CFG: `3.0`
|
78 |
+
- CFG Rescale: `0.0`
|
79 |
+
- Steps: `20`
|
80 |
+
- Sampler: `None`
|
81 |
+
- Seed: `42`
|
82 |
+
- Resolution: `1024x1024`
|
83 |
+
|
84 |
+
Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
|
85 |
+
|
86 |
+
You can find some example images in the following gallery:
|
87 |
+
|
88 |
+
|
89 |
+
<Gallery />
|
90 |
+
|
91 |
+
The text encoder **was not** trained.
|
92 |
+
You may reuse the base model text encoder for inference.
|
93 |
+
|
94 |
+
|
95 |
+
## Training settings
|
96 |
+
|
97 |
+
- Training epochs: 0
|
98 |
+
- Training steps: 100
|
99 |
+
- Learning rate: 7e-05
|
100 |
+
- Effective batch size: 12
|
101 |
+
- Micro-batch size: 2
|
102 |
+
- Gradient accumulation steps: 2
|
103 |
+
- Number of GPUs: 3
|
104 |
+
- Prediction type: flow-matching
|
105 |
+
- Rescaled betas zero SNR: False
|
106 |
+
- Optimizer: adamw_bf16weight_decay=1e-3
|
107 |
+
- Precision: Pure BF16
|
108 |
+
- Quantised: Yes: int8-quanto
|
109 |
+
- Xformers: Not used
|
110 |
+
- LyCORIS Config:
|
111 |
+
```json
|
112 |
+
{
|
113 |
+
"algo": "lokr",
|
114 |
+
"multiplier": 1.0,
|
115 |
+
"linear_dim": 10000,
|
116 |
+
"linear_alpha": 1,
|
117 |
+
"factor": 8,
|
118 |
+
"apply_preset": {
|
119 |
+
"target_module": [
|
120 |
+
"Attention",
|
121 |
+
"FeedForward"
|
122 |
+
],
|
123 |
+
"module_algo_map": {
|
124 |
+
"Attention": {
|
125 |
+
"factor": 6
|
126 |
+
},
|
127 |
+
"FeedForward": {
|
128 |
+
"factor": 4
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
```
|
134 |
+
|
135 |
+
## Datasets
|
136 |
+
|
137 |
+
### sfwbooru
|
138 |
+
- Repeats: 0
|
139 |
+
- Total number of images: ~639264
|
140 |
+
- Total number of aspect buckets: 81
|
141 |
+
- Resolution: 1.048576 megapixels
|
142 |
+
- Cropped: False
|
143 |
+
- Crop style: None
|
144 |
+
- Crop aspect: None
|
145 |
+
### normalnudes
|
146 |
+
- Repeats: 50
|
147 |
+
- Total number of images: ~1233
|
148 |
+
- Total number of aspect buckets: 31
|
149 |
+
- Resolution: 1.048576 megapixels
|
150 |
+
- Cropped: False
|
151 |
+
- Crop style: None
|
152 |
+
- Crop aspect: None
|
153 |
+
### guys
|
154 |
+
- Repeats: 0
|
155 |
+
- Total number of images: ~390
|
156 |
+
- Total number of aspect buckets: 16
|
157 |
+
- Resolution: 1.048576 megapixels
|
158 |
+
- Cropped: False
|
159 |
+
- Crop style: None
|
160 |
+
- Crop aspect: None
|
161 |
+
### signs
|
162 |
+
- Repeats: 0
|
163 |
+
- Total number of images: ~435
|
164 |
+
- Total number of aspect buckets: 19
|
165 |
+
- Resolution: 1.048576 megapixels
|
166 |
+
- Cropped: False
|
167 |
+
- Crop style: None
|
168 |
+
- Crop aspect: None
|
169 |
+
### nsfw-1024
|
170 |
+
- Repeats: 0
|
171 |
+
- Total number of images: ~10830
|
172 |
+
- Total number of aspect buckets: 14
|
173 |
+
- Resolution: 1.048576 megapixels
|
174 |
+
- Cropped: False
|
175 |
+
- Crop style: None
|
176 |
+
- Crop aspect: None
|
177 |
+
### anatomy
|
178 |
+
- Repeats: 2
|
179 |
+
- Total number of images: ~16440
|
180 |
+
- Total number of aspect buckets: 24
|
181 |
+
- Resolution: 1.048576 megapixels
|
182 |
+
- Cropped: False
|
183 |
+
- Crop style: None
|
184 |
+
- Crop aspect: None
|
185 |
+
### yoga
|
186 |
+
- Repeats: 0
|
187 |
+
- Total number of images: ~3642
|
188 |
+
- Total number of aspect buckets: 20
|
189 |
+
- Resolution: 1.048576 megapixels
|
190 |
+
- Cropped: False
|
191 |
+
- Crop style: None
|
192 |
+
- Crop aspect: None
|
193 |
+
### photo-aesthetics
|
194 |
+
- Repeats: 0
|
195 |
+
- Total number of images: ~33171
|
196 |
+
- Total number of aspect buckets: 30
|
197 |
+
- Resolution: 1.048576 megapixels
|
198 |
+
- Cropped: False
|
199 |
+
- Crop style: None
|
200 |
+
- Crop aspect: None
|
201 |
+
### text-1mp
|
202 |
+
- Repeats: 125
|
203 |
+
- Total number of images: ~13221
|
204 |
+
- Total number of aspect buckets: 14
|
205 |
+
- Resolution: 1.048576 megapixels
|
206 |
+
- Cropped: False
|
207 |
+
- Crop style: None
|
208 |
+
- Crop aspect: None
|
209 |
+
### normalnudes-crop
|
210 |
+
- Repeats: 50
|
211 |
+
- Total number of images: ~1146
|
212 |
+
- Total number of aspect buckets: 1
|
213 |
+
- Resolution: 1.048576 megapixels
|
214 |
+
- Cropped: True
|
215 |
+
- Crop style: random
|
216 |
+
- Crop aspect: square
|
217 |
+
### guys-crop
|
218 |
+
- Repeats: 0
|
219 |
+
- Total number of images: ~381
|
220 |
+
- Total number of aspect buckets: 1
|
221 |
+
- Resolution: 1.048576 megapixels
|
222 |
+
- Cropped: True
|
223 |
+
- Crop style: random
|
224 |
+
- Crop aspect: square
|
225 |
+
### signs-crop
|
226 |
+
- Repeats: 0
|
227 |
+
- Total number of images: ~417
|
228 |
+
- Total number of aspect buckets: 1
|
229 |
+
- Resolution: 1.048576 megapixels
|
230 |
+
- Cropped: True
|
231 |
+
- Crop style: random
|
232 |
+
- Crop aspect: square
|
233 |
+
### nsfw-1024-crop
|
234 |
+
- Repeats: 0
|
235 |
+
- Total number of images: ~10818
|
236 |
+
- Total number of aspect buckets: 1
|
237 |
+
- Resolution: 1.048576 megapixels
|
238 |
+
- Cropped: True
|
239 |
+
- Crop style: random
|
240 |
+
- Crop aspect: square
|
241 |
+
### anatomy-crop
|
242 |
+
- Repeats: 2
|
243 |
+
- Total number of images: ~16425
|
244 |
+
- Total number of aspect buckets: 1
|
245 |
+
- Resolution: 1.048576 megapixels
|
246 |
+
- Cropped: True
|
247 |
+
- Crop style: random
|
248 |
+
- Crop aspect: square
|
249 |
+
### yoga-crop
|
250 |
+
- Repeats: 0
|
251 |
+
- Total number of images: ~3618
|
252 |
+
- Total number of aspect buckets: 1
|
253 |
+
- Resolution: 1.048576 megapixels
|
254 |
+
- Cropped: True
|
255 |
+
- Crop style: random
|
256 |
+
- Crop aspect: square
|
257 |
+
### photo-aesthetics-crop
|
258 |
+
- Repeats: 0
|
259 |
+
- Total number of images: ~33141
|
260 |
+
- Total number of aspect buckets: 1
|
261 |
+
- Resolution: 1.048576 megapixels
|
262 |
+
- Cropped: True
|
263 |
+
- Crop style: random
|
264 |
+
- Crop aspect: square
|
265 |
+
### text-1mp-crop
|
266 |
+
- Repeats: 125
|
267 |
+
- Total number of images: ~13194
|
268 |
+
- Total number of aspect buckets: 1
|
269 |
+
- Resolution: 1.048576 megapixels
|
270 |
+
- Cropped: True
|
271 |
+
- Crop style: random
|
272 |
+
- Crop aspect: square
|
273 |
+
|
274 |
+
|
275 |
+
## Inference
|
276 |
+
|
277 |
+
|
278 |
+
```python
|
279 |
+
import torch
|
280 |
+
from diffusers import DiffusionPipeline
|
281 |
+
from lycoris import create_lycoris_from_weights
|
282 |
+
|
283 |
+
model_id = 'black-forest-labs/FLUX.1-dev'
|
284 |
+
adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
|
285 |
+
lora_scale = 1.0
|
286 |
+
wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
|
287 |
+
wrapper.merge_to()
|
288 |
+
|
289 |
+
prompt = "A photo-realistic image of a cat"
|
290 |
+
|
291 |
+
pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
|
292 |
+
image = pipeline(
|
293 |
+
prompt=prompt,
|
294 |
+
num_inference_steps=20,
|
295 |
+
generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
|
296 |
+
width=1024,
|
297 |
+
height=1024,
|
298 |
+
guidance_scale=3.0,
|
299 |
+
).images[0]
|
300 |
+
image.save("output.png", format="PNG")
|
301 |
+
```
|
302 |
+
|