Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ from util import *
|
|
34 |
from huggingface_hub import hf_hub_download
|
35 |
|
36 |
device= 'cpu'
|
37 |
-
model_path_e = hf_hub_download(repo_id="
|
38 |
ckpt = torch.load(model_path_e, map_location='cpu')
|
39 |
opts = ckpt['opts']
|
40 |
opts['checkpoint_path'] = model_path_e
|
@@ -70,7 +70,7 @@ device = 'cpu'
|
|
70 |
|
71 |
latent_dim = 512
|
72 |
|
73 |
-
model_path_s = hf_hub_download(repo_id="
|
74 |
original_generator = Generator(1024, latent_dim, 8, 2).to(device)
|
75 |
ckpt = torch.load(model_path_s, map_location=lambda storage, loc: storage)
|
76 |
original_generator.load_state_dict(ckpt["g_ema"], strict=False)
|
@@ -96,24 +96,24 @@ transform = transforms.Compose(
|
|
96 |
|
97 |
|
98 |
|
99 |
-
modeljojo = hf_hub_download(repo_id="
|
100 |
|
101 |
|
102 |
ckptjojo = torch.load(modeljojo, map_location=lambda storage, loc: storage)
|
103 |
generatorjojo.load_state_dict(ckptjojo["g"], strict=False)
|
104 |
|
105 |
-
modelcaitlyn = hf_hub_download(repo_id="
|
106 |
|
107 |
ckptcaitlyn = torch.load(modelcaitlyn, map_location=lambda storage, loc: storage)
|
108 |
generatorcaitlyn.load_state_dict(ckptcaitlyn["g"], strict=False)
|
109 |
|
110 |
-
modelart = hf_hub_download(repo_id="
|
111 |
|
112 |
ckptart = torch.load(modelart, map_location=lambda storage, loc: storage)
|
113 |
generatorart.load_state_dict(ckptart["g"], strict=False)
|
114 |
|
115 |
|
116 |
-
modelSketch = hf_hub_download(repo_id="
|
117 |
|
118 |
ckptsketch = torch.load(modelSketch, map_location=lambda storage, loc: storage)
|
119 |
generatorsketch.load_state_dict(ckptsketch["g"], strict=False)
|
|
|
34 |
from huggingface_hub import hf_hub_download
|
35 |
|
36 |
device= 'cpu'
|
37 |
+
model_path_e = hf_hub_download(repo_id="aijack/e4e", filename="e4e.pt")
|
38 |
ckpt = torch.load(model_path_e, map_location='cpu')
|
39 |
opts = ckpt['opts']
|
40 |
opts['checkpoint_path'] = model_path_e
|
|
|
70 |
|
71 |
latent_dim = 512
|
72 |
|
73 |
+
model_path_s = hf_hub_download(repo_id="aijack/stylegan2", filename="stylegan2.pt")
|
74 |
original_generator = Generator(1024, latent_dim, 8, 2).to(device)
|
75 |
ckpt = torch.load(model_path_s, map_location=lambda storage, loc: storage)
|
76 |
original_generator.load_state_dict(ckpt["g_ema"], strict=False)
|
|
|
96 |
|
97 |
|
98 |
|
99 |
+
modeljojo = hf_hub_download(repo_id="aijack/jojo", filename="jojo.pt")
|
100 |
|
101 |
|
102 |
ckptjojo = torch.load(modeljojo, map_location=lambda storage, loc: storage)
|
103 |
generatorjojo.load_state_dict(ckptjojo["g"], strict=False)
|
104 |
|
105 |
+
modelcaitlyn = hf_hub_download(repo_id="aijack/arcane", filename="arcane.pt")
|
106 |
|
107 |
ckptcaitlyn = torch.load(modelcaitlyn, map_location=lambda storage, loc: storage)
|
108 |
generatorcaitlyn.load_state_dict(ckptcaitlyn["g"], strict=False)
|
109 |
|
110 |
+
modelart = hf_hub_download(repo_id="aijack/art", filename="art.pt")
|
111 |
|
112 |
ckptart = torch.load(modelart, map_location=lambda storage, loc: storage)
|
113 |
generatorart.load_state_dict(ckptart["g"], strict=False)
|
114 |
|
115 |
|
116 |
+
modelSketch = hf_hub_download(repo_id="aijack/sketch", filename="sketch.pt")
|
117 |
|
118 |
ckptsketch = torch.load(modelSketch, map_location=lambda storage, loc: storage)
|
119 |
generatorsketch.load_state_dict(ckptsketch["g"], strict=False)
|