patrickvonplaten
commited on
Commit
•
9379e34
1
Parent(s):
4b5db08
update config
Browse files- README.md +2 -2
- model_index.json +1 -1
- run.py +2 -2
- unet/config.json +30 -21
- unet/{diffusion_model.pt → diffusion_pytorch_model.bin} +2 -2
- vqvae/{diffusion_model.pt → diffusion_pytorch_model.bin} +0 -0
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
|
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 =
|
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 |
-
"
|
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
|
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 =
|
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": "
|
3 |
"_diffusers_version": "0.0.4",
|
4 |
-
"
|
5 |
-
|
6 |
-
4,
|
7 |
-
2
|
8 |
-
],
|
9 |
-
"attn_resolutions": null,
|
10 |
"block_channels": [
|
11 |
224,
|
12 |
448,
|
13 |
672,
|
14 |
896
|
15 |
],
|
16 |
-
"
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
18 |
"down_blocks": [
|
19 |
-
"
|
20 |
-
"
|
21 |
-
"
|
22 |
-
"
|
23 |
],
|
24 |
"downsample_padding": 1,
|
25 |
"downscale_freq_shift": 0,
|
26 |
-
"dropout": 0,
|
27 |
"flip_sin_to_cos": true,
|
28 |
-
"
|
|
|
29 |
"in_channels": 3,
|
30 |
-
"
|
|
|
|
|
|
|
31 |
"num_head_channels": 32,
|
32 |
-
"num_res_blocks":
|
33 |
"out_channels": 3,
|
|
|
|
|
|
|
|
|
|
|
34 |
"up_blocks": [
|
35 |
-
"
|
36 |
-
"
|
37 |
-
"
|
38 |
-
"
|
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:
|
3 |
-
size
|
|
|
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
|