Spaces:
Runtime error
Runtime error
Commit
·
d54f4b1
1
Parent(s):
4efae7a
bugfix
Browse files
app.py
CHANGED
@@ -82,8 +82,9 @@ def style_transfer(content, style, style_type, alpha, keep_resolution):
|
|
82 |
output = decoder(feat).cpu().squeeze(0).clamp_(0, 1)
|
83 |
output = transforms.ToPILImage()(output)
|
84 |
|
85 |
-
torch.cuda.
|
86 |
-
|
|
|
87 |
|
88 |
return output
|
89 |
|
|
|
82 |
output = decoder(feat).cpu().squeeze(0).clamp_(0, 1)
|
83 |
output = transforms.ToPILImage()(output)
|
84 |
|
85 |
+
if torch.cuda.is_available():
|
86 |
+
torch.cuda.ipc_collect()
|
87 |
+
torch.cuda.empty_cache()
|
88 |
|
89 |
return output
|
90 |
|