Spaces:
Sleeping
Sleeping
zideliu
commited on
Commit
•
b19bf5d
1
Parent(s):
a4f846b
Update
Browse files- .gitmodules +6 -0
- app.py +7 -7
- taming/models/vqgan.py +1 -1
.gitmodules
CHANGED
@@ -1,3 +1,9 @@
|
|
1 |
[submodule "laion"]
|
2 |
path = laion
|
3 |
url = git@hf.co:laion/CLIP-ViT-bigG-14-laion2B-39B-b160k
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
[submodule "laion"]
|
2 |
path = laion
|
3 |
url = git@hf.co:laion/CLIP-ViT-bigG-14-laion2B-39B-b160k
|
4 |
+
[submodule "vqgan"]
|
5 |
+
path = vqgan
|
6 |
+
url = https://huggingface.co/zideliu/vqgan
|
7 |
+
[submodule "assets/vqgan"]
|
8 |
+
path = assets/vqgan
|
9 |
+
url = https://huggingface.co/zideliu/vqgan
|
app.py
CHANGED
@@ -97,13 +97,13 @@ print("GPU memory:",torch.cuda.memory_allocated(0))
|
|
97 |
print("downloading cc3m-285000.ckpt")
|
98 |
os.makedirs("assets/ckpts/cc3m-285000.ckpt",exist_ok=True)
|
99 |
|
100 |
-
wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/lr_scheduler.pth","assets/ckpts/cc3m-285000.ckpt/lr_scheduler.pth")
|
101 |
-
wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/optimizer.pth","assets/ckpts/cc3m-285000.ckpt/optimizer.pth")
|
102 |
-
wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/nnet.pth","assets/ckpts/cc3m-285000.ckpt/nnet.pth")
|
103 |
-
wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/nnet_ema.pth","assets/ckpts/cc3m-285000.ckpt/nnet_ema.pth")
|
104 |
-
wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/step.pth","assets/ckpts/cc3m-285000.ckpt/step.pth")
|
105 |
-
wget.download("https://huggingface.co/zideliu/vqgan/resolve/main/vqgan_jax_strongaug.ckpt","assets/vqgan_jax_strongaug.ckpt")
|
106 |
-
os.system("ls assets/ckpts/cc3m-285000.ckpt")
|
107 |
def set_seed(seed: int):
|
108 |
random.seed(seed)
|
109 |
np.random.seed(seed)
|
|
|
97 |
print("downloading cc3m-285000.ckpt")
|
98 |
os.makedirs("assets/ckpts/cc3m-285000.ckpt",exist_ok=True)
|
99 |
|
100 |
+
# wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/lr_scheduler.pth","assets/ckpts/cc3m-285000.ckpt/lr_scheduler.pth")
|
101 |
+
# wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/optimizer.pth","assets/ckpts/cc3m-285000.ckpt/optimizer.pth")
|
102 |
+
# wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/nnet.pth","assets/ckpts/cc3m-285000.ckpt/nnet.pth")
|
103 |
+
# wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/nnet_ema.pth","assets/ckpts/cc3m-285000.ckpt/nnet_ema.pth")
|
104 |
+
# wget.download("https://huggingface.co/nzl-thu/MUSE/resolve/main/assets/ckpts/cc3m-285000.ckpt/step.pth","assets/ckpts/cc3m-285000.ckpt/step.pth")
|
105 |
+
# wget.download("https://huggingface.co/zideliu/vqgan/resolve/main/vqgan_jax_strongaug.ckpt","assets/vqgan_jax_strongaug.ckpt")
|
106 |
+
# os.system("ls assets/ckpts/cc3m-285000.ckpt")
|
107 |
def set_seed(seed: int):
|
108 |
random.seed(seed)
|
109 |
np.random.seed(seed)
|
taming/models/vqgan.py
CHANGED
@@ -111,4 +111,4 @@ def get_model(config_file='vq-f16-jax.yaml'):
|
|
111 |
lossconfig=config.params.lossconfig,
|
112 |
n_embed=config.params.n_embed,
|
113 |
embed_dim=config.params.embed_dim,
|
114 |
-
ckpt_path='assets/vqgan_jax_strongaug.ckpt')
|
|
|
111 |
lossconfig=config.params.lossconfig,
|
112 |
n_embed=config.params.n_embed,
|
113 |
embed_dim=config.params.embed_dim,
|
114 |
+
ckpt_path='assets/vqgan/vqgan_jax_strongaug.ckpt')
|