bghira commited on
Commit
c385414
1 Parent(s): 2ddac81

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +268 -0
README.md ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 'blurry, cropped, ugly'
19
+ output:
20
+ url: ./assets/image_0_0.png
21
+ - text: 'a picture of tommy chong'
22
+ parameters:
23
+ negative_prompt: 'blurry, cropped, ugly'
24
+ output:
25
+ url: ./assets/image_1_0.png
26
+ - text: 'young tommy chong'
27
+ parameters:
28
+ negative_prompt: 'blurry, cropped, ugly'
29
+ output:
30
+ url: ./assets/image_2_0.png
31
+ - text: 'a stoic photograph of tommy chong. he looks off into the distance, standing up against the railing of a ship. the sky is cloudy.'
32
+ parameters:
33
+ negative_prompt: 'blurry, cropped, ugly'
34
+ output:
35
+ url: ./assets/image_3_0.png
36
+ - text: 'an elderly tommy chong as a contestant on Wheel of Fortune'
37
+ parameters:
38
+ negative_prompt: 'blurry, cropped, ugly'
39
+ output:
40
+ url: ./assets/image_4_0.png
41
+ - text: 'tommy chong as a superhero in the style of studio ghibli. he wears a metal armor suit with glowing lights and power indicators.'
42
+ parameters:
43
+ negative_prompt: 'blurry, cropped, ugly'
44
+ output:
45
+ url: ./assets/image_5_0.png
46
+ - text: 'tommy chong in a casket, dead. he is dead and it is a funeral. the text overhead says ''HE HAS NOT RISEN''.'
47
+ parameters:
48
+ negative_prompt: 'blurry, cropped, ugly'
49
+ output:
50
+ url: ./assets/image_6_0.png
51
+ - text: 'a picture of cheech marin'
52
+ parameters:
53
+ negative_prompt: 'blurry, cropped, ugly'
54
+ output:
55
+ url: ./assets/image_7_0.png
56
+ - text: 'young cheech marin'
57
+ parameters:
58
+ negative_prompt: 'blurry, cropped, ugly'
59
+ output:
60
+ url: ./assets/image_8_0.png
61
+ - text: 'a stoic photograph of cheech marin. he looks off into the distance, standing up against the railing of a ship. the sky is cloudy.'
62
+ parameters:
63
+ negative_prompt: 'blurry, cropped, ugly'
64
+ output:
65
+ url: ./assets/image_9_0.png
66
+ - text: 'an elderly cheech marin as a contestant on Wheel of Fortune'
67
+ parameters:
68
+ negative_prompt: 'blurry, cropped, ugly'
69
+ output:
70
+ url: ./assets/image_10_0.png
71
+ - text: 'cheech marin as a superhero in the style of studio ghibli. he wears a metal armor suit with glowing lights and power indicators.'
72
+ parameters:
73
+ negative_prompt: 'blurry, cropped, ugly'
74
+ output:
75
+ url: ./assets/image_11_0.png
76
+ - text: 'cheech marin in a casket, dead. he is dead and it is a funeral. the text overhead says ''HE HAS NOT RISEN''.'
77
+ parameters:
78
+ negative_prompt: 'blurry, cropped, ugly'
79
+ output:
80
+ url: ./assets/image_12_0.png
81
+ - text: 'cheech marin sitting to the left of tommy chong on the set of a television interview'
82
+ parameters:
83
+ negative_prompt: 'blurry, cropped, ugly'
84
+ output:
85
+ url: ./assets/image_13_0.png
86
+ - text: 'cheech marin sitting to the right of tommy chong on the set of a television interview'
87
+ parameters:
88
+ negative_prompt: 'blurry, cropped, ugly'
89
+ output:
90
+ url: ./assets/image_14_0.png
91
+ - text: 'cheech and chong sitting together on the stoop of a new york apartment building, 1972'
92
+ parameters:
93
+ negative_prompt: 'blurry, cropped, ugly'
94
+ output:
95
+ url: ./assets/image_15_0.png
96
+ - text: 'the iconic duo cheech and chong on stage performing stand-up comedy together in 2008'
97
+ parameters:
98
+ negative_prompt: 'blurry, cropped, ugly'
99
+ output:
100
+ url: ./assets/image_16_0.png
101
+ - text: 'A photo-realistic image of a cat'
102
+ parameters:
103
+ negative_prompt: 'blurry, cropped, ugly'
104
+ output:
105
+ url: ./assets/image_17_0.png
106
+ ---
107
+
108
+ # sd35m-cheechandchong-masked-reg-autoShift
109
+
110
+ This is a LyCORIS adapter derived from [stabilityai/stable-diffusion-3.5-medium](https://huggingface.co/stabilityai/stable-diffusion-3.5-medium).
111
+
112
+
113
+ The main validation prompt used during training was:
114
+
115
+
116
+
117
+ ```
118
+ A photo-realistic image of a cat
119
+ ```
120
+
121
+ ## Validation settings
122
+ - CFG: `3.0`
123
+ - CFG Rescale: `0.0`
124
+ - Steps: `20`
125
+ - Sampler: `None`
126
+ - Seed: `42`
127
+ - Resolution: `1024x1024`
128
+
129
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
130
+
131
+ You can find some example images in the following gallery:
132
+
133
+
134
+ <Gallery />
135
+
136
+ The text encoder **was not** trained.
137
+ You may reuse the base model text encoder for inference.
138
+
139
+
140
+ ## Training settings
141
+
142
+ - Training epochs: 3
143
+ - Training steps: 1000
144
+ - Learning rate: 0.0001
145
+ - Max grad norm: 0.01
146
+ - Effective batch size: 12
147
+ - Micro-batch size: 4
148
+ - Gradient accumulation steps: 1
149
+ - Number of GPUs: 3
150
+ - Prediction type: flow-matching
151
+ - Rescaled betas zero SNR: False
152
+ - Optimizer: bnb-adamw8bit
153
+ - Precision: Pure BF16
154
+ - Quantised: No
155
+ - Xformers: Not used
156
+ - LyCORIS Config:
157
+ ```json
158
+ {
159
+ "bypass_mode": true,
160
+ "algo": "lokr",
161
+ "multiplier": 1.0,
162
+ "full_matrix": true,
163
+ "linear_dim": 10000,
164
+ "linear_alpha": 1,
165
+ "factor": 12,
166
+ "apply_preset": {
167
+ "target_module": [
168
+ "JointTransformerBlock"
169
+ ],
170
+ "module_algo_map": {
171
+ "FeedForward": {
172
+ "factor": 6
173
+ },
174
+ "JointTransformerBlock": {
175
+ "factor": 12
176
+ }
177
+ }
178
+ }
179
+ }
180
+ ```
181
+
182
+ ## Datasets
183
+
184
+ ### reg-512
185
+ - Repeats: 0
186
+ - Total number of images: ~288
187
+ - Total number of aspect buckets: 11
188
+ - Resolution: 0.262144 megapixels
189
+ - Cropped: False
190
+ - Crop style: None
191
+ - Crop aspect: None
192
+ - Used for regularisation data: Yes
193
+ ### reg-1024
194
+ - Repeats: 0
195
+ - Total number of images: ~291
196
+ - Total number of aspect buckets: 14
197
+ - Resolution: 1.048576 megapixels
198
+ - Cropped: False
199
+ - Crop style: None
200
+ - Crop aspect: None
201
+ - Used for regularisation data: Yes
202
+ ### cheechandchong-uncropped-512
203
+ - Repeats: 10
204
+ - Total number of images: ~24
205
+ - Total number of aspect buckets: 5
206
+ - Resolution: 0.262144 megapixels
207
+ - Cropped: False
208
+ - Crop style: None
209
+ - Crop aspect: None
210
+ - Used for regularisation data: No
211
+ ### cheechandchong-cropped-512
212
+ - Repeats: 10
213
+ - Total number of images: ~24
214
+ - Total number of aspect buckets: 5
215
+ - Resolution: 0.262144 megapixels
216
+ - Cropped: False
217
+ - Crop style: None
218
+ - Crop aspect: None
219
+ - Used for regularisation data: No
220
+ ### cheechandchong-uncropped-1024
221
+ - Repeats: 10
222
+ - Total number of images: ~24
223
+ - Total number of aspect buckets: 7
224
+ - Resolution: 1.048576 megapixels
225
+ - Cropped: False
226
+ - Crop style: None
227
+ - Crop aspect: None
228
+ - Used for regularisation data: No
229
+ ### cheechandchong-cropped-1024
230
+ - Repeats: 10
231
+ - Total number of images: ~24
232
+ - Total number of aspect buckets: 7
233
+ - Resolution: 1.048576 megapixels
234
+ - Cropped: False
235
+ - Crop style: None
236
+ - Crop aspect: None
237
+ - Used for regularisation data: No
238
+
239
+
240
+ ## Inference
241
+
242
+
243
+ ```python
244
+ import torch
245
+ from diffusers import DiffusionPipeline
246
+ from lycoris import create_lycoris_from_weights
247
+
248
+ model_id = 'stabilityai/stable-diffusion-3.5-medium'
249
+ adapter_id = 'pytorch_lora_weights.safetensors' # you will have to download this manually
250
+ lora_scale = 1.0
251
+ wrapper, _ = create_lycoris_from_weights(lora_scale, adapter_id, pipeline.transformer)
252
+ wrapper.merge_to()
253
+
254
+ prompt = "A photo-realistic image of a cat"
255
+ negative_prompt = 'blurry, cropped, ugly'
256
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
257
+ image = pipeline(
258
+ prompt=prompt,
259
+ negative_prompt=negative_prompt,
260
+ num_inference_steps=20,
261
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
262
+ width=1024,
263
+ height=1024,
264
+ guidance_scale=3.0,
265
+ ).images[0]
266
+ image.save("output.png", format="PNG")
267
+ ```
268
+