jumbo patch

This commit is contained in:
Vladimir Mandic
2023-09-08 13:01:20 -04:00
parent 5b41115bc8
commit f36c1eb476
29 changed files with 244 additions and 103 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ def setup_model(dirname):
cropped_face_t = cropped_face_t.unsqueeze(0).to(devices.device_codeformer)
try:
with torch.no_grad():
with devices.inference_context():
output = self.net(cropped_face_t, w=w if w is not None else shared.opts.code_former_weight, adain=True)[0]
restored_face = tensor2img(output, rgb2bgr=True, min_max=(-1, 1))
del output