Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -75,13 +75,13 @@ def gen_sources(deepfake_img):
|
|
75 |
# Load model checkpoints
|
76 |
checkpoint_f = torch.load(checkpoint_path_f, map_location=device)
|
77 |
# Load the state dictionary into the models
|
78 |
-
model_vaq_f
|
79 |
model_vaq_f.eval()
|
80 |
#------------Initialize:Decoder-G------------------------
|
81 |
checkpoint_path_g = "./models/model_vaq2_gg.pth"
|
82 |
checkpoint_g = torch.load(checkpoint_path_g, map_location=device)
|
83 |
# Load the state dictionary into the models
|
84 |
-
model_vaq_g
|
85 |
model_vaq_g.eval()
|
86 |
##------------------------Initialize Model-F-------------------------------------
|
87 |
model_z1 = DeepfakeToSourceTransformer().to(device)
|
|
|
75 |
# Load model checkpoints
|
76 |
checkpoint_f = torch.load(checkpoint_path_f, map_location=device)
|
77 |
# Load the state dictionary into the models
|
78 |
+
model_vaq_f.load_state_dict(checkpoint_f, strict=True)
|
79 |
model_vaq_f.eval()
|
80 |
#------------Initialize:Decoder-G------------------------
|
81 |
checkpoint_path_g = "./models/model_vaq2_gg.pth"
|
82 |
checkpoint_g = torch.load(checkpoint_path_g, map_location=device)
|
83 |
# Load the state dictionary into the models
|
84 |
+
model_vaq_g.load_state_dict(checkpoint_g, strict=True)
|
85 |
model_vaq_g.eval()
|
86 |
##------------------------Initialize Model-F-------------------------------------
|
87 |
model_z1 = DeepfakeToSourceTransformer().to(device)
|