Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
•
7f4023f
1
Parent(s):
1bcc2cd
Update app.py
Browse files
app.py
CHANGED
@@ -35,6 +35,7 @@ import torchvision.transforms as transforms
|
|
35 |
from argparse import Namespace
|
36 |
from e4e.models.psp import pSp
|
37 |
from util import *
|
|
|
38 |
|
39 |
os.makedirs('models', exist_ok=True)
|
40 |
os.system("gdown https://drive.google.com/uc?id=1jtCg8HQ6RlTmLdnbT2PfW1FJ2AYkWqsK")
|
@@ -114,7 +115,10 @@ transform = transforms.Compose(
|
|
114 |
|
115 |
os.system("wget https://huggingface.co/akhaliq/JoJoGAN-jojo/resolve/main/jojo_preserve_color.pt")
|
116 |
|
117 |
-
|
|
|
|
|
|
|
118 |
generatorjojo.load_state_dict(ckptjojo["g"], strict=False)
|
119 |
|
120 |
os.system("wget https://huggingface.co/akhaliq/jojogan-disney/resolve/main/disney_preserve_color.pt")
|
|
|
35 |
from argparse import Namespace
|
36 |
from e4e.models.psp import pSp
|
37 |
from util import *
|
38 |
+
from huggingface_hub import hf_hub_download
|
39 |
|
40 |
os.makedirs('models', exist_ok=True)
|
41 |
os.system("gdown https://drive.google.com/uc?id=1jtCg8HQ6RlTmLdnbT2PfW1FJ2AYkWqsK")
|
|
|
115 |
|
116 |
os.system("wget https://huggingface.co/akhaliq/JoJoGAN-jojo/resolve/main/jojo_preserve_color.pt")
|
117 |
|
118 |
+
model = hf_hub_download(repo_id="akhaliq/jojo-gan-jinx", filename="arcane_jinx_preserve_color.pt")
|
119 |
+
|
120 |
+
|
121 |
+
ckptjojo = torch.load(model, map_location=lambda storage, loc: storage)
|
122 |
generatorjojo.load_state_dict(ckptjojo["g"], strict=False)
|
123 |
|
124 |
os.system("wget https://huggingface.co/akhaliq/jojogan-disney/resolve/main/disney_preserve_color.pt")
|