bghira commited on
Commit
e0ce9da
·
verified ·
1 Parent(s): 9e47c8a

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +614 -0
README.md ADDED
@@ -0,0 +1,614 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: "stabilityai/stable-diffusion-3.5-medium"
4
+ tags:
5
+ - sd3
6
+ - sd3-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: 'ugly, cropped, blurry, low-quality, mediocre average'
19
+ output:
20
+ url: ./assets/image_0_0.png
21
+ - text: 'Alien planet, strange rock formations, glowing plants, bizarre creatures, surreal atmosphere'
22
+ parameters:
23
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
24
+ output:
25
+ url: ./assets/image_1_0.png
26
+ - text: 'Alien marketplace, bizarre creatures, exotic goods, vibrant colors, otherworldly atmosphere'
27
+ parameters:
28
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
29
+ output:
30
+ url: ./assets/image_2_0.png
31
+ - text: 'Child holding a balloon, happy expression, colorful balloons, sunny day, high detail'
32
+ parameters:
33
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
34
+ output:
35
+ url: ./assets/image_3_0.png
36
+ - text: 'a 4-panel comic strip showing an orange cat saying the words ''HELP'' and ''LASAGNA'''
37
+ parameters:
38
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
39
+ output:
40
+ url: ./assets/image_4_0.png
41
+ - text: 'a hand is holding a comic book with a cover that reads ''The Adventures of Superhero'''
42
+ parameters:
43
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
44
+ output:
45
+ url: ./assets/image_5_0.png
46
+ - text: 'Underground cave filled with crystals, glowing lights, reflective surfaces, fantasy environment, high detail'
47
+ parameters:
48
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
49
+ output:
50
+ url: ./assets/image_6_0.png
51
+ - text: 'Bustling cyberpunk bazaar, vendors, neon signs, advanced tech, crowded, high detail'
52
+ parameters:
53
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
54
+ output:
55
+ url: ./assets/image_7_0.png
56
+ - text: 'Cyberpunk hacker in a dark room, neon glow, multiple screens, intense focus, high detail'
57
+ parameters:
58
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
59
+ output:
60
+ url: ./assets/image_8_0.png
61
+ - text: 'a cybernetic anne of green gables with neural implant and bio mech augmentations'
62
+ parameters:
63
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
64
+ output:
65
+ url: ./assets/image_9_0.png
66
+ - text: 'Post-apocalyptic cityscape, ruined buildings, overgrown vegetation, dark and gritty, high detail'
67
+ parameters:
68
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
69
+ output:
70
+ url: ./assets/image_10_0.png
71
+ - text: 'Magical castle in a lush forest, glowing windows, fantasy architecture, high resolution, detailed textures'
72
+ parameters:
73
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
74
+ output:
75
+ url: ./assets/image_11_0.png
76
+ - text: 'Ruins of an ancient temple in an enchanted forest, glowing runes, mystical creatures, high detail'
77
+ parameters:
78
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
79
+ output:
80
+ url: ./assets/image_12_0.png
81
+ - text: 'Mystical forest, glowing plants, fairies, magical creatures, fantasy art, high detail'
82
+ parameters:
83
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
84
+ output:
85
+ url: ./assets/image_13_0.png
86
+ - text: 'Magical garden with glowing flowers, fairies, serene atmosphere, detailed plants, high resolution'
87
+ parameters:
88
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
89
+ output:
90
+ url: ./assets/image_14_0.png
91
+ - text: 'Whimsical garden filled with fairies, magical plants, sparkling lights, serene atmosphere, high detail'
92
+ parameters:
93
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
94
+ output:
95
+ url: ./assets/image_15_0.png
96
+ - text: 'Majestic dragon soaring through the sky, detailed scales, dynamic pose, fantasy art, high resolution'
97
+ parameters:
98
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
99
+ output:
100
+ url: ./assets/image_16_0.png
101
+ - text: 'Fantasy world, floating islands in the sky, waterfalls, lush vegetation, detailed landscape, high resolution'
102
+ parameters:
103
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
104
+ output:
105
+ url: ./assets/image_17_0.png
106
+ - text: 'Futuristic city skyline at night, neon lights, cyberpunk style, high contrast, sharp focus'
107
+ parameters:
108
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
109
+ output:
110
+ url: ./assets/image_18_0.png
111
+ - text: 'Space battle scene, starships fighting, laser beams, explosions, cosmic background'
112
+ parameters:
113
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
114
+ output:
115
+ url: ./assets/image_19_0.png
116
+ - text: 'Abandoned fairground at night, eerie rides, ghostly figures, fog, dark atmosphere, high detail'
117
+ parameters:
118
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
119
+ output:
120
+ url: ./assets/image_20_0.png
121
+ - text: 'Spooky haunted mansion on a hill, dark and eerie, glowing windows, ghostly atmosphere, high detail'
122
+ parameters:
123
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
124
+ output:
125
+ url: ./assets/image_21_0.png
126
+ - text: 'a hardcover physics textbook that is called PHYSICS FOR DUMMIES'
127
+ parameters:
128
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
129
+ output:
130
+ url: ./assets/image_22_0.png
131
+ - text: 'Epic medieval battle, knights in armor, dynamic action, detailed landscape, high resolution'
132
+ parameters:
133
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
134
+ output:
135
+ url: ./assets/image_23_0.png
136
+ - text: 'Bustling medieval market with merchants, knights, and jesters, vibrant colors, detailed'
137
+ parameters:
138
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
139
+ output:
140
+ url: ./assets/image_24_0.png
141
+ - text: 'Cozy medieval tavern, warm firelight, adventurers drinking, detailed interior, rustic atmosphere'
142
+ parameters:
143
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
144
+ output:
145
+ url: ./assets/image_25_0.png
146
+ - text: 'Futuristic city skyline at night, neon lights, cyberpunk style, high contrast, sharp focus'
147
+ parameters:
148
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
149
+ output:
150
+ url: ./assets/image_26_0.png
151
+ - text: 'Forest with neon-lit trees, glowing plants, bioluminescence, surreal atmosphere, high detail'
152
+ parameters:
153
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
154
+ output:
155
+ url: ./assets/image_27_0.png
156
+ - text: 'Bright neon sign in a busy city street, ''Open 24 Hours'', bold typography, glowing lights'
157
+ parameters:
158
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
159
+ output:
160
+ url: ./assets/image_28_0.png
161
+ - text: 'Vibrant neon sign, ''Bar'', bold typography, dark background, glowing lights, detailed design'
162
+ parameters:
163
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
164
+ output:
165
+ url: ./assets/image_29_0.png
166
+ - text: 'Pirate ship on the high seas, stormy weather, detailed sails, dramatic waves, photorealistic'
167
+ parameters:
168
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
169
+ output:
170
+ url: ./assets/image_30_0.png
171
+ - text: 'Pirate discovering a treasure chest, detailed gold coins, tropical island, dramatic lighting'
172
+ parameters:
173
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
174
+ output:
175
+ url: ./assets/image_31_0.png
176
+ - text: 'a photograph of a woman experiencing a psychedelic trip. trippy, 8k, uhd, fractal'
177
+ parameters:
178
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
179
+ output:
180
+ url: ./assets/image_32_0.png
181
+ - text: 'Cozy cafe on a rainy day, people sipping coffee, warm lights, reflections on wet pavement, photorealistic'
182
+ parameters:
183
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
184
+ output:
185
+ url: ./assets/image_33_0.png
186
+ - text: '1980s arcade, neon lights, vintage game machines, kids playing, vibrant colors, nostalgic atmosphere'
187
+ parameters:
188
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
189
+ output:
190
+ url: ./assets/image_34_0.png
191
+ - text: '1980s game room with vintage arcade machines, neon lights, vibrant colors, nostalgic feel'
192
+ parameters:
193
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
194
+ output:
195
+ url: ./assets/image_35_0.png
196
+ - text: 'Robot blacksmith forging metal, sparks flying, detailed workshop, futuristic and medieval blend'
197
+ parameters:
198
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
199
+ output:
200
+ url: ./assets/image_36_0.png
201
+ - text: 'Sleek robot performing a dance, futuristic theater, holographic effects, detailed, high resolution'
202
+ parameters:
203
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
204
+ output:
205
+ url: ./assets/image_37_0.png
206
+ - text: 'High-tech factory where robots are assembled, detailed machinery, futuristic setting, high detail'
207
+ parameters:
208
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
209
+ output:
210
+ url: ./assets/image_38_0.png
211
+ - text: 'Garden tended by robots, mechanical plants, colorful flowers, futuristic setting, high detail'
212
+ parameters:
213
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
214
+ output:
215
+ url: ./assets/image_39_0.png
216
+ - text: 'Cute robotic pet, futuristic home, sleek design, detailed features, friendly and animated'
217
+ parameters:
218
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
219
+ output:
220
+ url: ./assets/image_40_0.png
221
+ - text: 'cctv trail camera night time security picture of a wendigo in the woods'
222
+ parameters:
223
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
224
+ output:
225
+ url: ./assets/image_41_0.png
226
+ - text: 'Astronaut exploring an alien planet, detailed landscape, futuristic suit, cosmic background'
227
+ parameters:
228
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
229
+ output:
230
+ url: ./assets/image_42_0.png
231
+ - text: 'Futuristic space station orbiting a distant exoplanet, sleek design, detailed structures, cosmic backdrop'
232
+ parameters:
233
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
234
+ output:
235
+ url: ./assets/image_43_0.png
236
+ - text: 'a person holding a sign that reads ''SOON'''
237
+ parameters:
238
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
239
+ output:
240
+ url: ./assets/image_44_0.png
241
+ - text: 'Steampunk airship in the sky, intricate design, Victorian aesthetics, dynamic scene, high detail'
242
+ parameters:
243
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
244
+ output:
245
+ url: ./assets/image_45_0.png
246
+ - text: 'Steampunk inventor in a workshop, intricate gadgets, Victorian attire, mechanical arm, goggles'
247
+ parameters:
248
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
249
+ output:
250
+ url: ./assets/image_46_0.png
251
+ - text: 'Stormy ocean with towering waves, dramatic skies, detailed water, intense atmosphere, high resolution'
252
+ parameters:
253
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
254
+ output:
255
+ url: ./assets/image_47_0.png
256
+ - text: 'Dramatic stormy sea, lighthouse in the distance, lightning striking, dark clouds, high detail'
257
+ parameters:
258
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
259
+ output:
260
+ url: ./assets/image_48_0.png
261
+ - text: 'Graffiti artist creating a mural, vibrant colors, urban setting, dynamic action, high resolution'
262
+ parameters:
263
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
264
+ output:
265
+ url: ./assets/image_49_0.png
266
+ - text: 'Urban alleyway filled with vibrant graffiti art, tags and murals, realistic textures'
267
+ parameters:
268
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
269
+ output:
270
+ url: ./assets/image_50_0.png
271
+ - text: 'Urban street sign, ''Main Street'', bold typography, realistic textures, weathered look'
272
+ parameters:
273
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
274
+ output:
275
+ url: ./assets/image_51_0.png
276
+ - text: 'Classic car show with vintage vehicles, vibrant colors, nostalgic atmosphere, high detail'
277
+ parameters:
278
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
279
+ output:
280
+ url: ./assets/image_52_0.png
281
+ - text: 'Retro diner sign, ''Joe''s Diner'', classic 1950s design, neon lights, weathered look'
282
+ parameters:
283
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
284
+ output:
285
+ url: ./assets/image_53_0.png
286
+ - text: 'Vintage store sign with elaborate typography, ''Antique Shop'', hand-painted, weathered look'
287
+ parameters:
288
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
289
+ output:
290
+ url: ./assets/image_54_0.png
291
+ - text: 'A photo-realistic image of a cat'
292
+ parameters:
293
+ negative_prompt: 'ugly, cropped, blurry, low-quality, mediocre average'
294
+ output:
295
+ url: ./assets/image_55_0.png
296
+ ---
297
+
298
+ # sd35m-photo-clip_value-shift3
299
+
300
+ This is a LyCORIS adapter derived from [stabilityai/stable-diffusion-3.5-medium](https://huggingface.co/stabilityai/stable-diffusion-3.5-medium).
301
+
302
+
303
+ The main validation prompt used during training was:
304
+ ```
305
+ A photo-realistic image of a cat
306
+ ```
307
+
308
+
309
+ ## Validation settings
310
+ - CFG: `6.0`
311
+ - CFG Rescale: `0.0`
312
+ - Steps: `30`
313
+ - Sampler: `FlowMatchEulerDiscreteScheduler`
314
+ - Seed: `42`
315
+ - Resolution: `1024x1024`
316
+ - Skip-layer guidance:
317
+
318
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
319
+
320
+ You can find some example images in the following gallery:
321
+
322
+
323
+ <Gallery />
324
+
325
+ The text encoder **was not** trained.
326
+ You may reuse the base model text encoder for inference.
327
+
328
+
329
+ ## Training settings
330
+
331
+ - Training epochs: 1
332
+ - Training steps: 113000
333
+ - Learning rate: 1e-05
334
+ - Learning rate schedule: constant
335
+ - Warmup steps: 500
336
+ - Max grad norm: 1.0
337
+ - Effective batch size: 9
338
+ - Micro-batch size: 3
339
+ - Gradient accumulation steps: 1
340
+ - Number of GPUs: 3
341
+ - Gradient checkpointing: True
342
+ - Prediction type: flow-matching (extra parameters=['shift=3.0'])
343
+ - Optimizer: bnb-adamw8bit
344
+ - Trainable parameter precision: Pure BF16
345
+ - Caption dropout probability: 10.0%
346
+
347
+
348
+ ### LyCORIS Config:
349
+ ```json
350
+ {
351
+ "bypass_mode": true,
352
+ "algo": "lokr",
353
+ "multiplier": 1.0,
354
+ "full_matrix": true,
355
+ "linear_dim": 10000,
356
+ "linear_alpha": 1,
357
+ "factor": 4,
358
+ "apply_preset": {
359
+ "target_module": [
360
+ "Attention",
361
+ "FeedForward"
362
+ ],
363
+ "module_algo_map": {
364
+ "FeedForward": {
365
+ "factor": 4
366
+ },
367
+ "Attention": {
368
+ "factor": 2
369
+ }
370
+ }
371
+ }
372
+ }
373
+ ```
374
+
375
+ ## Datasets
376
+
377
+ ### text-1mp
378
+ - Repeats: 100
379
+ - Total number of images: ~13221
380
+ - Total number of aspect buckets: 25
381
+ - Resolution: 1.048576 megapixels
382
+ - Cropped: False
383
+ - Crop style: None
384
+ - Crop aspect: None
385
+ - Used for regularisation data: No
386
+ ### signs
387
+ - Repeats: 150
388
+ - Total number of images: ~420
389
+ - Total number of aspect buckets: 14
390
+ - Resolution: 1.048576 megapixels
391
+ - Cropped: False
392
+ - Crop style: None
393
+ - Crop aspect: None
394
+ - Used for regularisation data: No
395
+ ### moviecollection
396
+ - Repeats: 0
397
+ - Total number of images: ~1983
398
+ - Total number of aspect buckets: 35
399
+ - Resolution: 1.048576 megapixels
400
+ - Cropped: False
401
+ - Crop style: None
402
+ - Crop aspect: None
403
+ - Used for regularisation data: No
404
+ ### bookcovers
405
+ - Repeats: 0
406
+ - Total number of images: ~927
407
+ - Total number of aspect buckets: 26
408
+ - Resolution: 1.048576 megapixels
409
+ - Cropped: False
410
+ - Crop style: None
411
+ - Crop aspect: None
412
+ - Used for regularisation data: No
413
+ ### shutterstock
414
+ - Repeats: 0
415
+ - Total number of images: ~21111
416
+ - Total number of aspect buckets: 35
417
+ - Resolution: 1.048576 megapixels
418
+ - Cropped: False
419
+ - Crop style: None
420
+ - Crop aspect: None
421
+ - Used for regularisation data: No
422
+ ### cinemamix-1mp
423
+ - Repeats: 0
424
+ - Total number of images: ~7425
425
+ - Total number of aspect buckets: 5
426
+ - Resolution: 1.048576 megapixels
427
+ - Cropped: False
428
+ - Crop style: None
429
+ - Crop aspect: None
430
+ - Used for regularisation data: No
431
+ ### anatomy
432
+ - Repeats: 5
433
+ - Total number of images: ~16440
434
+ - Total number of aspect buckets: 22
435
+ - Resolution: 1.048576 megapixels
436
+ - Cropped: False
437
+ - Crop style: None
438
+ - Crop aspect: None
439
+ - Used for regularisation data: No
440
+ ### signs-512
441
+ - Repeats: 0
442
+ - Total number of images: ~417
443
+ - Total number of aspect buckets: 12
444
+ - Resolution: 0.262144 megapixels
445
+ - Cropped: False
446
+ - Crop style: None
447
+ - Crop aspect: None
448
+ - Used for regularisation data: No
449
+ ### moviecollection-512
450
+ - Repeats: 0
451
+ - Total number of images: ~1971
452
+ - Total number of aspect buckets: 19
453
+ - Resolution: 0.262144 megapixels
454
+ - Cropped: False
455
+ - Crop style: None
456
+ - Crop aspect: None
457
+ - Used for regularisation data: No
458
+ ### bookcovers-512
459
+ - Repeats: 0
460
+ - Total number of images: ~918
461
+ - Total number of aspect buckets: 16
462
+ - Resolution: 0.262144 megapixels
463
+ - Cropped: False
464
+ - Crop style: None
465
+ - Crop aspect: None
466
+ - Used for regularisation data: No
467
+ ### shutterstock-512
468
+ - Repeats: 0
469
+ - Total number of images: ~21096
470
+ - Total number of aspect buckets: 19
471
+ - Resolution: 0.262144 megapixels
472
+ - Cropped: False
473
+ - Crop style: None
474
+ - Crop aspect: None
475
+ - Used for regularisation data: No
476
+ ### cinemamix-1mp-512
477
+ - Repeats: 0
478
+ - Total number of images: ~7422
479
+ - Total number of aspect buckets: 3
480
+ - Resolution: 0.262144 megapixels
481
+ - Cropped: False
482
+ - Crop style: None
483
+ - Crop aspect: None
484
+ - Used for regularisation data: No
485
+ ### anatomy-512
486
+ - Repeats: 5
487
+ - Total number of images: ~16437
488
+ - Total number of aspect buckets: 13
489
+ - Resolution: 0.262144 megapixels
490
+ - Cropped: False
491
+ - Crop style: None
492
+ - Crop aspect: None
493
+ - Used for regularisation data: No
494
+ ### signs-1440
495
+ - Repeats: 100
496
+ - Total number of images: ~423
497
+ - Total number of aspect buckets: 25
498
+ - Resolution: 2.0736 megapixels
499
+ - Cropped: False
500
+ - Crop style: None
501
+ - Crop aspect: None
502
+ - Used for regularisation data: No
503
+ ### moviecollection-1440
504
+ - Repeats: 0
505
+ - Total number of images: ~2007
506
+ - Total number of aspect buckets: 46
507
+ - Resolution: 2.0736 megapixels
508
+ - Cropped: False
509
+ - Crop style: None
510
+ - Crop aspect: None
511
+ - Used for regularisation data: No
512
+ ### bookcovers-1440
513
+ - Repeats: 0
514
+ - Total number of images: ~933
515
+ - Total number of aspect buckets: 31
516
+ - Resolution: 2.0736 megapixels
517
+ - Cropped: False
518
+ - Crop style: None
519
+ - Crop aspect: None
520
+ - Used for regularisation data: No
521
+ ### shutterstock-1440
522
+ - Repeats: 0
523
+ - Total number of images: ~21111
524
+ - Total number of aspect buckets: 44
525
+ - Resolution: 2.0736 megapixels
526
+ - Cropped: False
527
+ - Crop style: None
528
+ - Crop aspect: None
529
+ - Used for regularisation data: No
530
+ ### cinemamix-1mp-1440
531
+ - Repeats: 0
532
+ - Total number of images: ~7425
533
+ - Total number of aspect buckets: 5
534
+ - Resolution: 2.0736 megapixels
535
+ - Cropped: False
536
+ - Crop style: None
537
+ - Crop aspect: None
538
+ - Used for regularisation data: No
539
+ ### anatomy-1440
540
+ - Repeats: 5
541
+ - Total number of images: ~16458
542
+ - Total number of aspect buckets: 34
543
+ - Resolution: 2.0736 megapixels
544
+ - Cropped: False
545
+ - Crop style: None
546
+ - Crop aspect: None
547
+ - Used for regularisation data: No
548
+
549
+
550
+ ## Inference
551
+
552
+
553
+ ```python
554
+ import torch
555
+ from diffusers import DiffusionPipeline
556
+ from lycoris import create_lycoris_from_weights
557
+
558
+
559
+ def download_adapter(repo_id: str):
560
+ import os
561
+ from huggingface_hub import hf_hub_download
562
+ adapter_filename = "pytorch_lora_weights.safetensors"
563
+ cache_dir = os.environ.get('HF_PATH', os.path.expanduser('~/.cache/huggingface/hub/models'))
564
+ cleaned_adapter_path = repo_id.replace("/", "_").replace("\\", "_").replace(":", "_")
565
+ path_to_adapter = os.path.join(cache_dir, cleaned_adapter_path)
566
+ path_to_adapter_file = os.path.join(path_to_adapter, adapter_filename)
567
+ os.makedirs(path_to_adapter, exist_ok=True)
568
+ hf_hub_download(
569
+ repo_id=repo_id, filename=adapter_filename, local_dir=path_to_adapter
570
+ )
571
+
572
+ return path_to_adapter_file
573
+
574
+ model_id = 'stabilityai/stable-diffusion-3.5-medium'
575
+ adapter_repo_id = 'bghira/sd35m-photo-clip_value-shift3'
576
+ adapter_filename = 'pytorch_lora_weights.safetensors'
577
+ adapter_file_path = download_adapter(repo_id=adapter_repo_id)
578
+ pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16) # loading directly in bf16
579
+ lora_scale = 1.0
580
+ wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_file_path, pipeline.transformer)
581
+ wrapper.merge_to()
582
+
583
+ prompt = "A photo-realistic image of a cat"
584
+ negative_prompt = 'ugly, cropped, blurry, low-quality, mediocre average'
585
+
586
+ ## Optional: quantise the model to save on vram.
587
+ ## Note: The model was quantised during training, and so it is recommended to do the same during inference time.
588
+ from optimum.quanto import quantize, freeze, qint8
589
+ quantize(pipeline.transformer, weights=qint8)
590
+ freeze(pipeline.transformer)
591
+
592
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu') # the pipeline is already in its target precision level
593
+ image = pipeline(
594
+ prompt=prompt,
595
+ negative_prompt=negative_prompt,
596
+ num_inference_steps=30,
597
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(42),
598
+ width=1024,
599
+ height=1024,
600
+ guidance_scale=6.0,
601
+ ).images[0]
602
+ image.save("output.png", format="PNG")
603
+ ```
604
+
605
+
606
+
607
+ ## Exponential Moving Average (EMA)
608
+
609
+ SimpleTuner generates a safetensors variant of the EMA weights and a pt file.
610
+
611
+ The safetensors file is intended to be used for inference, and the pt file is for continuing finetuning.
612
+
613
+ The EMA model may provide a more well-rounded result, but typically will feel undertrained compared to the full model as it is a running decayed average of the model weights.
614
+