patrickvonplaten commited on
Commit
9379e34
•
1 Parent(s): 4b5db08

update config

Browse files
README.md CHANGED
@@ -24,7 +24,7 @@ tags:
24
 
25
  ```python
26
  !pip install git+https://github.com/huggingface/diffusers.git
27
- from diffusers import UNetUnconditionalModel, DDIMScheduler, VQModel
28
  import torch
29
  import PIL.Image
30
  import numpy as np
@@ -33,7 +33,7 @@ import tqdm
33
  seed = 3
34
 
35
  # load all models
36
- unet = UNetUnconditionalModel.from_pretrained("CompVis/latent-diffusion-celeba-256", subfolder="unet")
37
  vqvae = VQModel.from_pretrained("CompVis/latent-diffusion-celeba-256", subfolder="vqvae")
38
  scheduler = DDIMScheduler.from_config("CompVis/latent-diffusion-celeba-256", subfolder="scheduler")
39
 
 
24
 
25
  ```python
26
  !pip install git+https://github.com/huggingface/diffusers.git
27
+ from diffusers import UNet2DModel, DDIMScheduler, VQModel
28
  import torch
29
  import PIL.Image
30
  import numpy as np
 
33
  seed = 3
34
 
35
  # load all models
36
+ unet = UNet2DModel.from_pretrained("CompVis/latent-diffusion-celeba-256", subfolder="unet")
37
  vqvae = VQModel.from_pretrained("CompVis/latent-diffusion-celeba-256", subfolder="vqvae")
38
  scheduler = DDIMScheduler.from_config("CompVis/latent-diffusion-celeba-256", subfolder="scheduler")
39
 
model_index.json CHANGED
@@ -7,7 +7,7 @@
7
  ],
8
  "unet": [
9
  "diffusers",
10
- "UNetUnconditionalModel"
11
  ],
12
  "vqvae": [
13
  "diffusers",
 
7
  ],
8
  "unet": [
9
  "diffusers",
10
+ "UNet2DModel"
11
  ],
12
  "vqvae": [
13
  "diffusers",
run.py CHANGED
@@ -1,5 +1,5 @@
1
  #!/usr/bin/env python3
2
- from diffusers import UNetUnconditionalModel, DDIMScheduler, VQModel
3
  import torch
4
  import PIL.Image
5
  import numpy as np
@@ -10,7 +10,7 @@ seed = 3
10
  # 1. Unroll the full loop
11
  # ==================================================================
12
  # load all models
13
- unet = UNetUnconditionalModel.from_pretrained("./", subfolder="unet")
14
  vqvae = VQModel.from_pretrained("./", subfolder="vqvae")
15
  scheduler = DDIMScheduler.from_config("./", subfolder="scheduler")
16
 
 
1
  #!/usr/bin/env python3
2
+ from diffusers import UNet2DModel, DDIMScheduler, VQModel
3
  import torch
4
  import PIL.Image
5
  import numpy as np
 
10
  # 1. Unroll the full loop
11
  # ==================================================================
12
  # load all models
13
+ unet = UNet2DModel.from_pretrained("./", subfolder="unet")
14
  vqvae = VQModel.from_pretrained("./", subfolder="vqvae")
15
  scheduler = DDIMScheduler.from_config("./", subfolder="scheduler")
16
 
unet/config.json CHANGED
@@ -1,40 +1,49 @@
1
  {
2
- "_class_name": "UNetUnconditionalModel",
3
  "_diffusers_version": "0.0.4",
4
- "attention_resolutions": [
5
- 8,
6
- 4,
7
- 2
8
- ],
9
- "attn_resolutions": null,
10
  "block_channels": [
11
  224,
12
  448,
13
  672,
14
  896
15
  ],
16
- "conv_resample": true,
17
- "ddpm": false,
 
 
 
 
 
18
  "down_blocks": [
19
- "UNetResDownBlock2D",
20
- "UNetResAttnDownBlock2D",
21
- "UNetResAttnDownBlock2D",
22
- "UNetResAttnDownBlock2D"
23
  ],
24
  "downsample_padding": 1,
25
  "downscale_freq_shift": 0,
26
- "dropout": 0,
27
  "flip_sin_to_cos": true,
28
- "image_size": 64,
 
29
  "in_channels": 3,
30
- "name_or_path": "fusing/latent-diffusion-celeba-256",
 
 
 
31
  "num_head_channels": 32,
32
- "num_res_blocks": 2,
33
  "out_channels": 3,
 
 
 
 
 
34
  "up_blocks": [
35
- "UNetResAttnUpBlock2D",
36
- "UNetResAttnUpBlock2D",
37
- "UNetResAttnUpBlock2D",
38
- "UNetResUpBlock2D"
39
  ]
40
  }
 
1
  {
2
+ "_class_name": "UNet2DModel",
3
  "_diffusers_version": "0.0.4",
4
+ "act_fn": "silu",
5
+ "attention_head_dim": 32,
 
 
 
 
6
  "block_channels": [
7
  224,
8
  448,
9
  672,
10
  896
11
  ],
12
+ "block_out_channels": [
13
+ 224,
14
+ 448,
15
+ 672,
16
+ 896
17
+ ],
18
+ "center_input_sample": false,
19
  "down_blocks": [
20
+ "DownBlock2D",
21
+ "AttnDownBlock2D",
22
+ "AttnDownBlock2D",
23
+ "AttnDownBlock2D"
24
  ],
25
  "downsample_padding": 1,
26
  "downscale_freq_shift": 0,
 
27
  "flip_sin_to_cos": true,
28
+ "freq_shift": 0,
29
+ "image_size": null,
30
  "in_channels": 3,
31
+ "layers_per_block": 2,
32
+ "mid_block_scale_factor": 1,
33
+ "norm_eps": 1e-05,
34
+ "norm_num_groups": 32,
35
  "num_head_channels": 32,
36
+ "num_res_blocks": null,
37
  "out_channels": 3,
38
+ "resnet_act_fn": "silu",
39
+ "resnet_eps": 1e-05,
40
+ "resnet_num_groups": 32,
41
+ "sample_size": 64,
42
+ "time_embedding_type": "positional",
43
  "up_blocks": [
44
+ "AttnUpBlock2D",
45
+ "AttnUpBlock2D",
46
+ "AttnUpBlock2D",
47
+ "UpBlock2D"
48
  ]
49
  }
unet/{diffusion_model.pt → diffusion_pytorch_model.bin} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:92c10d34b4b5741593982e90db6ad1e650e6210ade6593b75f80af7f41e33611
3
- size 1096368033
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9302717f933ebf63fd2f35b7311e558d8d08eec2df6d68d4e925c1dde5509604
3
+ size 1096382177
vqvae/{diffusion_model.pt → diffusion_pytorch_model.bin} RENAMED
File without changes