Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files- inference.py +1 -1
inference.py
CHANGED
@@ -89,6 +89,6 @@ def inference(
|
|
89 |
foreground_mask_resized = F.interpolate(foreground_mask.unsqueeze(1), size=generated_image.shape[2:], mode='nearest')
|
90 |
generated_image.data = generated_image.data * (1 - foreground_mask_resized) + content_image.data * foreground_mask_resized
|
91 |
|
92 |
-
if iter % 10 == 0: print(f'[{
|
93 |
|
94 |
return generated_image, background_ratio
|
|
|
89 |
foreground_mask_resized = F.interpolate(foreground_mask.unsqueeze(1), size=generated_image.shape[2:], mode='nearest')
|
90 |
generated_image.data = generated_image.data * (1 - foreground_mask_resized) + content_image.data * foreground_mask_resized
|
91 |
|
92 |
+
if iter % 10 == 0: print(f'[{"Background" if apply_to_background else "Image"}] Loss ({iter}):', min_losses[iter])
|
93 |
|
94 |
return generated_image, background_ratio
|