Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -86,9 +86,8 @@ def inference(content_image, style_name, style_strength, output_quality, progres
|
|
86 |
|
87 |
with torch.no_grad():
|
88 |
content_features = model(content_img)
|
89 |
-
|
90 |
-
|
91 |
-
else: style_features = style_features[1]
|
92 |
|
93 |
for _ in tqdm(range(iters), desc='The magic is happening ✨'):
|
94 |
optimizer.zero_grad()
|
|
|
86 |
|
87 |
with torch.no_grad():
|
88 |
content_features = model(content_img)
|
89 |
+
if img_size == 512: style_features = cached_style_features[style_name][0]
|
90 |
+
else: style_features = cached_style_features[style_name][1]
|
|
|
91 |
|
92 |
for _ in tqdm(range(iters), desc='The magic is happening ✨'):
|
93 |
optimizer.zero_grad()
|