Bruno Guisard commited on
Commit
9e5f50a
•
1 Parent(s): 081aeaa

Migrate model to PyTorch

Browse files
model_index.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_class_name": "FlaxStableDiffusionPipeline",
3
  "_diffusers_version": "0.16.0.dev0",
4
  "feature_extractor": [
5
  null,
@@ -11,11 +11,11 @@
11
  ],
12
  "scheduler": [
13
  "diffusers",
14
- "FlaxPNDMScheduler"
15
  ],
16
  "text_encoder": [
17
  "transformers",
18
- "FlaxCLIPTextModel"
19
  ],
20
  "tokenizer": [
21
  "transformers",
@@ -23,10 +23,10 @@
23
  ],
24
  "unet": [
25
  "diffusers",
26
- "FlaxUNet2DConditionModel"
27
  ],
28
  "vae": [
29
  "diffusers",
30
- "FlaxAutoencoderKL"
31
  ]
32
  }
 
1
  {
2
+ "_class_name": "StableDiffusionPipeline",
3
  "_diffusers_version": "0.16.0.dev0",
4
  "feature_extractor": [
5
  null,
 
11
  ],
12
  "scheduler": [
13
  "diffusers",
14
+ "PNDMScheduler"
15
  ],
16
  "text_encoder": [
17
  "transformers",
18
+ "CLIPTextModel"
19
  ],
20
  "tokenizer": [
21
  "transformers",
 
23
  ],
24
  "unet": [
25
  "diffusers",
26
+ "UNet2DConditionModel"
27
  ],
28
  "vae": [
29
  "diffusers",
30
+ "AutoencoderKL"
31
  ]
32
  }
scheduler/scheduler_config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_class_name": "FlaxPNDMScheduler",
3
  "_diffusers_version": "0.16.0.dev0",
4
  "beta_end": 0.012,
5
  "beta_schedule": "scaled_linear",
 
1
  {
2
+ "_class_name": "PNDMScheduler",
3
  "_diffusers_version": "0.16.0.dev0",
4
  "beta_end": 0.012,
5
  "beta_schedule": "scaled_linear",
text_encoder/{flax_model.msgpack → pytorch_model.bin} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:60f914bf080600a7d6678c70339679c7997d03faec449d2bd2e5269673b25762
3
- size 1361564130
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2188379b05015f531d61503e714234d00a64939792f3098b324e516547f0194f
3
+ size 1361674657
tokenizer/special_tokens_map.json CHANGED
@@ -1,24 +1,24 @@
1
  {
2
- "bos_token": {
3
- "content": "<|startoftext|>",
4
- "lstrip": false,
5
- "normalized": true,
6
- "rstrip": false,
7
- "single_word": false
8
- },
9
- "eos_token": {
10
- "content": "<|endoftext|>",
11
- "lstrip": false,
12
- "normalized": true,
13
- "rstrip": false,
14
- "single_word": false
15
- },
16
- "pad_token": "!",
17
- "unk_token": {
18
- "content": "<|endoftext|>",
19
- "lstrip": false,
20
- "normalized": true,
21
- "rstrip": false,
22
- "single_word": false
23
- }
24
  }
 
 
1
  {
2
+ "bos_token": {
3
+ "content": "<|startoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "!",
17
+ "unk_token": {
18
+ "content": "<|endoftext|>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
 
23
  }
24
+ }
tokenizer/tokenizer_config.json CHANGED
@@ -1,34 +1,34 @@
1
  {
2
- "add_prefix_space": false,
3
- "bos_token": {
4
- "__type": "AddedToken",
5
- "content": "<|startoftext|>",
6
- "lstrip": false,
7
- "normalized": true,
8
- "rstrip": false,
9
- "single_word": false
10
- },
11
- "do_lower_case": true,
12
- "eos_token": {
13
- "__type": "AddedToken",
14
- "content": "<|endoftext|>",
15
- "lstrip": false,
16
- "normalized": true,
17
- "rstrip": false,
18
- "single_word": false
19
- },
20
- "errors": "replace",
21
- "model_max_length": 77,
22
- "name_or_path": "stabilityai/stable-diffusion-2",
23
- "pad_token": "<|endoftext|>",
24
- "special_tokens_map_file": "./special_tokens_map.json",
25
- "tokenizer_class": "CLIPTokenizer",
26
- "unk_token": {
27
- "__type": "AddedToken",
28
- "content": "<|endoftext|>",
29
- "lstrip": false,
30
- "normalized": true,
31
- "rstrip": false,
32
- "single_word": false
33
- }
34
  }
 
 
1
  {
2
+ "add_prefix_space": false,
3
+ "bos_token": {
4
+ "__type": "AddedToken",
5
+ "content": "<|startoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false
10
+ },
11
+ "clean_up_tokenization_spaces": true,
12
+ "do_lower_case": true,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "<|endoftext|>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "errors": "replace",
22
+ "model_max_length": 77,
23
+ "name_or_path": "stabilityai/stable-diffusion-2"
24
+ "pad_token": "<|endoftext|>",
25
+ "tokenizer_class": "CLIPTokenizer",
26
+ "unk_token": {
27
+ "__type": "AddedToken",
28
+ "content": "<|endoftext|>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false
 
33
  }
34
+ }
tokenizer/vocab.json CHANGED
The diff for this file is too large to render. See raw diff
 
unet/config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_class_name": "FlaxUNet2DConditionModel",
3
  "_diffusers_version": "0.16.0.dev0",
4
  "act_fn": "silu",
5
  "attention_head_dim": [
@@ -15,7 +15,12 @@
15
  1280
16
  ],
17
  "center_input_sample": false,
 
 
 
 
18
  "cross_attention_dim": 1024,
 
19
  "down_block_types": [
20
  "CrossAttnDownBlock2D",
21
  "CrossAttnDownBlock2D",
@@ -25,23 +30,35 @@
25
  "downsample_padding": 1,
26
  "dropout": 0.0,
27
  "dual_cross_attention": false,
 
28
  "flip_sin_to_cos": true,
29
  "freq_shift": 0,
30
  "in_channels": 4,
31
  "layers_per_block": 2,
 
32
  "mid_block_scale_factor": 1,
 
33
  "norm_eps": 1e-05,
34
  "norm_num_groups": 32,
35
  "num_class_embeds": null,
36
  "only_cross_attention": false,
37
  "out_channels": 4,
 
 
 
 
38
  "sample_size": 64,
 
 
 
 
39
  "up_block_types": [
40
  "UpBlock2D",
41
  "CrossAttnUpBlock2D",
42
  "CrossAttnUpBlock2D",
43
  "CrossAttnUpBlock2D"
44
  ],
 
45
  "use_linear_projection": true,
46
  "use_memory_efficient_attention": false
47
  }
 
1
  {
2
+ "_class_name": "UNet2DConditionModel",
3
  "_diffusers_version": "0.16.0.dev0",
4
  "act_fn": "silu",
5
  "attention_head_dim": [
 
15
  1280
16
  ],
17
  "center_input_sample": false,
18
+ "class_embed_type": null,
19
+ "class_embeddings_concat": false,
20
+ "conv_in_kernel": 3,
21
+ "conv_out_kernel": 3,
22
  "cross_attention_dim": 1024,
23
+ "cross_attention_norm": null,
24
  "down_block_types": [
25
  "CrossAttnDownBlock2D",
26
  "CrossAttnDownBlock2D",
 
30
  "downsample_padding": 1,
31
  "dropout": 0.0,
32
  "dual_cross_attention": false,
33
+ "encoder_hid_dim": null,
34
  "flip_sin_to_cos": true,
35
  "freq_shift": 0,
36
  "in_channels": 4,
37
  "layers_per_block": 2,
38
+ "mid_block_only_cross_attention": null,
39
  "mid_block_scale_factor": 1,
40
+ "mid_block_type": "UNetMidBlock2DCrossAttn",
41
  "norm_eps": 1e-05,
42
  "norm_num_groups": 32,
43
  "num_class_embeds": null,
44
  "only_cross_attention": false,
45
  "out_channels": 4,
46
+ "projection_class_embeddings_input_dim": null,
47
+ "resnet_out_scale_factor": 1.0,
48
+ "resnet_skip_time_act": false,
49
+ "resnet_time_scale_shift": "default",
50
  "sample_size": 64,
51
+ "time_cond_proj_dim": null,
52
+ "time_embedding_act_fn": null,
53
+ "time_embedding_type": "positional",
54
+ "timestep_post_act": null,
55
  "up_block_types": [
56
  "UpBlock2D",
57
  "CrossAttnUpBlock2D",
58
  "CrossAttnUpBlock2D",
59
  "CrossAttnUpBlock2D"
60
  ],
61
+ "upcast_attention": false,
62
  "use_linear_projection": true,
63
  "use_memory_efficient_attention": false
64
  }
unet/{diffusion_flax_model.msgpack → diffusion_pytorch_model.bin} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f165b465f6925fe41aa1f6578bf17e5f54974d8be63785d53fb66a25da915c84
3
- size 3463667343
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65b425b483ab603699a9d9948759ed18a200d207852ffd2f26f640d0c22507c5
3
+ size 3463925093
vae/config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_class_name": "FlaxAutoencoderKL",
3
  "_diffusers_version": "0.16.0.dev0",
4
  "act_fn": "silu",
5
  "block_out_channels": [
 
1
  {
2
+ "_class_name": "AutoencoderKL",
3
  "_diffusers_version": "0.16.0.dev0",
4
  "act_fn": "silu",
5
  "block_out_channels": [
vae/{diffusion_flax_model.msgpack → diffusion_pytorch_model.bin} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4f45517affbc93f169d2f5022c6c7d6c7912477f571e8011ddddeca115001562
3
- size 334623853
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:36bb8e1b54aba3a0914eb35fba13dcb107e9f18d379d1df2158732cd4bf56a94
3
+ size 334711857