nielsr HF Staff commited on
Commit
5cc8cb6
·
verified ·
1 Parent(s): 3528710

Add pipeline tag and library name, link to code

Browse files

This PR improves the model card by ensuring it can be found at https://huggingface.co/models?pipeline_tag=text-to-image and uses the Diffusers library.

Files changed (1) hide show
  1. README.md +460 -3
README.md CHANGED
@@ -1,3 +1,460 @@
1
- ---
2
- license: cc-by-nc-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ pipeline_tag: text-to-image
4
+ library_name: diffusers
5
+ ---
6
+
7
+ # File information
8
+
9
+ The repository contains the following file information:
10
+
11
+ Filename: model_index.json
12
+ Content: {
13
+ "_class_name": "StableDiffusionPipeline",
14
+ "_diffusers_version": "0.6.0",
15
+ "feature_extractor": [
16
+ "transformers",
17
+ "CLIPImageProcessor"
18
+ ],
19
+ "safety_checker": [
20
+ "stable_diffusion",
21
+ "StableDiffusionSafetyChecker"
22
+ ],
23
+ "scheduler": [
24
+ "diffusers",
25
+ "PNDMScheduler"
26
+ ],
27
+ "text_encoder": [
28
+ "transformers",
29
+ "CLIPTextModel"
30
+ ],
31
+ "tokenizer": [
32
+ "transformers",
33
+ "CLIPTokenizer"
34
+ ],
35
+ "unet": [
36
+ "diffusers",
37
+ "UNet2DConditionModel"
38
+ ],
39
+ "vae": [
40
+ "diffusers",
41
+ "AutoencoderKL"
42
+ ]
43
+ }
44
+
45
+ Filename: preprocessor_config.json
46
+ Content: {
47
+ "crop_size": 224,
48
+ "do_center_crop": true,
49
+ "do_convert_rgb": true,
50
+ "do_normalize": true,
51
+ "do_resize": true,
52
+ "feature_extractor_type": "CLIPFeatureExtractor",
53
+ "image_mean": [
54
+ 0.48145466,
55
+ 0.4578275,
56
+ "0.40821073"
57
+ ],
58
+ "image_std": [
59
+ "0.26862954",
60
+ "0.26130258",
61
+ "0.27577711"
62
+ ],
63
+ "resample": 3,
64
+ "size": 224
65
+ }
66
+
67
+ Filename: config.json
68
+ Content: {
69
+ "_commit_hash": "4bb648a606ef040e7685bde262611766a5fdd67b",
70
+ "_name_or_path": "CompVis/stable-diffusion-safety-checker",
71
+ "architectures": [
72
+ "StableDiffusionSafetyChecker"
73
+ ],
74
+ "initializer_factor": 1.0,
75
+ "logit_scale_init_value": 2.6592,
76
+ "model_type": "clip",
77
+ "projection_dim": 768,
78
+ "text_config": {
79
+ "_name_or_path": "",
80
+ "add_cross_attention": false,
81
+ "architectures": null,
82
+ "attention_dropout": 0.0,
83
+ "bad_words_ids": null,
84
+ "bos_token_id": 0,
85
+ "chunk_size_feed_forward": 0,
86
+ "cross_attention_hidden_size": null,
87
+ "decoder_start_token_id": null,
88
+ "diversity_penalty": 0.0,
89
+ "do_sample": false,
90
+ "dropout": 0.0,
91
+ "early_stopping": false,
92
+ "encoder_no_repeat_ngram_size": 0,
93
+ "eos_token_id": 2,
94
+ "exponential_decay_length_penalty": null,
95
+ "finetuning_task": null,
96
+ "forced_bos_token_id": null,
97
+ "forced_eos_token_id": null,
98
+ "hidden_act": "quick_gelu",
99
+ "hidden_size": 768,
100
+ "id2label": {
101
+ "0": "LABEL_0",
102
+ "1": "LABEL_1"
103
+ },
104
+ "initializer_factor": 1.0,
105
+ "initializer_range": 0.02,
106
+ "intermediate_size": 3072,
107
+ "is_decoder": false,
108
+ "is_encoder_decoder": false,
109
+ "label2id": {
110
+ "LABEL_0": 0,
111
+ "LABEL_1": 1
112
+ },
113
+ "layer_norm_eps": 1e-05,
114
+ "length_penalty": 1.0,
115
+ "max_length": 20,
116
+ "max_position_embeddings": 77,
117
+ "min_length": 0,
118
+ "model_type": "clip_text_model",
119
+ "no_repeat_ngram_size": 0,
120
+ "num_attention_heads": 12,
121
+ "num_beam_groups": 1,
122
+ "num_beams": 1,
123
+ "num_hidden_layers": 12,
124
+ "num_return_sequences": 1,
125
+ "output_attentions": false,
126
+ "output_hidden_states": false,
127
+ "output_scores": false,
128
+ "pad_token_id": 1,
129
+ "prefix": null,
130
+ "problem_type": null,
131
+ "pruned_heads": {},
132
+ "remove_invalid_values": false,
133
+ "repetition_penalty": 1.0,
134
+ "return_dict": true,
135
+ "return_dict_in_generate": false,
136
+ "sep_token_id": null,
137
+ "task_specific_params": null,
138
+ "temperature": 1.0,
139
+ "tf_legacy_loss": false,
140
+ "tie_encoder_decoder": false,
141
+ "tie_word_embeddings": true,
142
+ "tokenizer_class": null,
143
+ "top_k": 50,
144
+ "top_p": 1.0,
145
+ "torch_dtype": null,
146
+ "torchscript": false,
147
+ "transformers_version": "4.22.0.dev0",
148
+ "typical_p": 1.0,
149
+ "use_bfloat16": false,
150
+ "vocab_size": 49408
151
+ },
152
+ "text_config_dict": {
153
+ "hidden_size": 768,
154
+ "intermediate_size": 3072,
155
+ "num_attention_heads": 12,
156
+ "num_hidden_layers": 12
157
+ },
158
+ "torch_dtype": "float32",
159
+ "transformers_version": null,
160
+ "vision_config": {
161
+ "_name_or_path": "",
162
+ "add_cross_attention": false,
163
+ "architectures": null,
164
+ "attention_dropout": 0.0,
165
+ "bad_words_ids": null,
166
+ "bos_token_id": null,
167
+ "chunk_size_feed_forward": 0,
168
+ "cross_attention_hidden_size": null,
169
+ "decoder_start_token_id": null,
170
+ "diversity_penalty": 0.0,
171
+ "do_sample": false,
172
+ "dropout": 0.0,
173
+ "early_stopping": false,
174
+ "encoder_no_repeat_ngram_size": 0,
175
+ "eos_token_id": null,
176
+ "exponential_decay_length_penalty": null,
177
+ "finetuning_task": null,
178
+ "forced_bos_token_id": null,
179
+ "forced_eos_token_id": null,
180
+ "hidden_act": "quick_gelu",
181
+ "hidden_size": 1024,
182
+ "id2label": {
183
+ "0": "LABEL_0",
184
+ "1": "LABEL_1"
185
+ },
186
+ "image_size": 224,
187
+ "initializer_factor": 1.0,
188
+ "initializer_range": 0.02,
189
+ "intermediate_size": 4096,
190
+ "is_decoder": false,
191
+ "is_encoder_decoder": false,
192
+ "label2id": {
193
+ "LABEL_0": 0,
194
+ "LABEL_1": 1
195
+ },
196
+ "layer_norm_eps": 1e-05,
197
+ "length_penalty": 1.0,
198
+ "max_length": 20,
199
+ "min_length": 0,
200
+ "model_type": "clip_vision_model",
201
+ "no_repeat_ngram_size": 0,
202
+ "num_attention_heads": 16,
203
+ "num_beam_groups": 1,
204
+ "num_beams": 1,
205
+ "num_channels": 3,
206
+ "num_hidden_layers": 24,
207
+ "num_return_sequences": 1,
208
+ "output_attentions": false,
209
+ "output_hidden_states": false,
210
+ "output_scores": false,
211
+ "pad_token_id": null,
212
+ "patch_size": 14,
213
+ "prefix": null,
214
+ "problem_type": null,
215
+ "pruned_heads": {},
216
+ "remove_invalid_values": false,
217
+ "repetition_penalty": 1.0,
218
+ "return_dict": true,
219
+ "return_dict_in_generate": false,
220
+ "sep_token_id": null,
221
+ "task_specific_params": null,
222
+ "temperature": 1.0,
223
+ "tf_legacy_loss": false,
224
+ "tie_encoder_decoder": false,
225
+ "tie_word_embeddings": true,
226
+ "tokenizer_class": null,
227
+ "top_k": 50,
228
+ "top_p": 1.0,
229
+ "torch_dtype": null,
230
+ "torchscript": false,
231
+ "transformers_version": "4.22.0.dev0",
232
+ "typical_p": 1.0,
233
+ "use_bfloat16": false
234
+ },
235
+ "vision_config_dict": {
236
+ "hidden_size": 1024,
237
+ "intermediate_size": 4096,
238
+ "num_attention_heads": 16,
239
+ "num_hidden_layers": 24,
240
+ "patch_size": 14
241
+ }
242
+ }
243
+
244
+ Filename: config.json
245
+ Content: {
246
+ "_class_name": "AutoencoderKL",
247
+ "_diffusers_version": "0.6.0",
248
+ "act_fn": "silu",
249
+ "block_out_channels": [
250
+ 128,
251
+ 256,
252
+ 512,
253
+ 512
254
+ ],
255
+ "down_block_types": [
256
+ "DownEncoderBlock2D",
257
+ "DownEncoderBlock2D",
258
+ "DownEncoderBlock2D",
259
+ "DownEncoderBlock2D"
260
+ ],
261
+ "in_channels": 3,
262
+ "latent_channels": 4,
263
+ "layers_per_block": 2,
264
+ "norm_num_groups": 32,
265
+ "out_channels": 3,
266
+ "sample_size": 512,
267
+ "up_block_types": [
268
+ "UpDecoderBlock2D",
269
+ "UpDecoderBlock2D",
270
+ "UpDecoderBlock2D",
271
+ "UpDecoderBlock2D"
272
+ ]
273
+ }
274
+
275
+ Filename: vocab.json
276
+ Content: Content of the file is larger than 50 KB, too long to display.
277
+
278
+ Filename: special_tokens_map.json
279
+ Content: {
280
+ "bos_token": {
281
+ "content": "<|startoftext|>",
282
+ "lstrip": false,
283
+ "normalized": true,
284
+ "rstrip": false,
285
+ "single_word": false
286
+ },
287
+ "eos_token": {
288
+ "content": "<|endoftext|>",
289
+ "lstrip": false,
290
+ "normalized": true,
291
+ "rstrip": false,
292
+ "single_word": false
293
+ },
294
+ "pad_token": "<|endoftext|>",
295
+ "unk_token": {
296
+ "content": "<|endoftext|>",
297
+ "lstrip": false,
298
+ "normalized": true,
299
+ "rstrip": false,
300
+ "single_word": false
301
+ }
302
+ }
303
+
304
+ Filename: tokenizer_config.json
305
+ Content: {
306
+ "add_prefix_space": false,
307
+ "bos_token": {
308
+ "__type": "AddedToken",
309
+ "content": "<|startoftext|>",
310
+ "lstrip": false,
311
+ "normalized": true,
312
+ "rstrip": false,
313
+ "single_word": false
314
+ },
315
+ "do_lower_case": true,
316
+ "eos_token": {
317
+ "__type": "AddedToken",
318
+ "content": "<|endoftext|>\",
319
+ \"lstrip\": false,
320
+ \"normalized\": true,
321
+ \"rstrip\": false,
322
+ \"single_word\": false
323
+ },
324
+ "errors": "replace",
325
+ "model_max_length": 77,
326
+ "name_or_path": "openai/clip-vit-large-patch14",
327
+ "pad_token": "<|endoftext|>",
328
+ "special_tokens_map_file": "./special_tokens_map.json",
329
+ "tokenizer_class": "CLIPTokenizer",
330
+ "unk_token": {
331
+ "__type": "AddedToken",
332
+ "content": "<|endoftext|>",
333
+ "lstrip": false,
334
+ "normalized": true,
335
+ "rstrip": false,
336
+ "single_word": false
337
+ }
338
+ }
339
+
340
+ Filename: config.json
341
+ Content: {
342
+ "_class_name": "UNet2DConditionModel",
343
+ "_diffusers_version": "0.28.2",
344
+ "_name_or_path": "/home/share/Loopfree/pretrained/loopfree-step4-sd15",
345
+ "act_fn": "silu",
346
+ "addition_embed_type": null,
347
+ "addition_embed_type_num_heads": 64,
348
+ "addition_time_embed_dim": null,
349
+ "attention_head_dim": 8,
350
+ "attention_type": "default",
351
+ "block_out_channels": [
352
+ 320,
353
+ 640,
354
+ 1280,
355
+ 1280
356
+ ],
357
+ "center_input_sample": false,
358
+ "class_embed_type": null,
359
+ "class_embeddings_concat": false,
360
+ "conv_in_kernel": 3,
361
+ "conv_out_kernel": 3,
362
+ "cross_attention_dim": 768,
363
+ "cross_attention_norm": null,
364
+ "decay": 0.9999,
365
+ "down_block_types": [
366
+ "CrossAttnDownBlock2D",
367
+ "CrossAttnDownBlock2D",
368
+ "CrossAttnDownBlock2D",
369
+ "DownBlock2D"
370
+ ],
371
+ "downsample_padding": 1,
372
+ "dropout": 0.0,
373
+ "dual_cross_attention": false,
374
+ "encoder_hid_dim": null,
375
+ "encoder_hid_dim_type": null,
376
+ "flip_sin_to_cos": true,
377
+ "freq_shift": 0,
378
+ "in_channels": 4,
379
+ "inv_gamma": 1.0,
380
+ "layers_per_block": 2,
381
+ "mid_block_only_cross_attention": null,
382
+ "mid_block_scale_factor": 1,
383
+ "mid_block_type": "UNetMidBlock2DCrossAttn",
384
+ "min_decay": 0.0,
385
+ "norm_eps": 1e-05,
386
+ "norm_num_groups": 32,
387
+ "num_attention_heads": null,
388
+ "num_class_embeds": null,
389
+ "only_cross_attention": false,
390
+ "optimization_step": 10000,
391
+ "out_channels": 4,
392
+ "power": 0.6666666666666666,
393
+ "projection_class_embeddings_input_dim": null,
394
+ "resnet_out_scale_factor": 1.0,
395
+ "resnet_skip_time_act": false,
396
+ "resnet_time_scale_shift": "default",
397
+ "reverse_transformer_layers_per_block": null,
398
+ "sample_size": 64,
399
+ "time_cond_proj_dim": null,
400
+ "time_embedding_act_fn": null,
401
+ "time_embedding_dim": null,
402
+ "time_embedding_type": "positional",
403
+ "timestep_post_act": null,
404
+ "transformer_layers_per_block": 1,
405
+ "up_block_types": [
406
+ "UpBlock2D",
407
+ "CrossAttnUpBlock2D",
408
+ "CrossAttnUpBlock2D",
409
+ "CrossAttnUpBlock2D"
410
+ ],
411
+ "upcast_attention": false,
412
+ "update_after_step": 0,
413
+ "use_ema_warmup": false,
414
+ "use_linear_projection": false
415
+ }
416
+
417
+ Filename: scheduler_config.json
418
+ Content: {
419
+ "_class_name": "PNDMScheduler",
420
+ "_diffusers_version": "0.6.0",
421
+ "beta_end": 0.012,
422
+ "beta_schedule": "scaled_linear",
423
+ "beta_start": 0.00085,
424
+ "num_train_timesteps": 1000,
425
+ "set_alpha_to_one": false,
426
+ "skip_prk_steps": true,
427
+ "steps_offset": 1,
428
+ "trained_betas": null,
429
+ "clip_sample": false
430
+ }
431
+
432
+ Filename: config.json
433
+ Content: {
434
+ "_name_or_path": "openai/clip-vit-large-patch14",
435
+ "architectures": [
436
+ "CLIPTextModel"
437
+ ],
438
+ "attention_dropout": 0.0,
439
+ "bos_token_id": 0,
440
+ "dropout": 0.0,
441
+ "eos_token_id": 2,
442
+ "hidden_act": "quick_gelu",
443
+ "hidden_size": 768,
444
+ "initializer_factor": 1.0,
445
+ "initializer_range": 0.02,
446
+ "intermediate_size": 3072,
447
+ "layer_norm_eps": 1e-05,
448
+ "max_position_embeddings": 77,
449
+ "model_type": "clip_text_model",
450
+ "num_attention_heads": 12,
451
+ "num_hidden_layers": 12,
452
+ "pad_token_id": 1,
453
+ "projection_dim": 768,
454
+ "torch_dtype": "float32",
455
+ "transformers_version": "4.22.0.dev0",
456
+ "vocab_size": 49408
457
+ }
458
+
459
+ This model implements the method described in the paper [One-Way Ticket:Time-Independent Unified Encoder for Distilling Text-to-Image Diffusion Models](https://huggingface.co/papers/2505.21960).
460
+ Github repository: https://github.com/sen-mao/Loopfree