Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
6afc27b
1
Parent(s):
0c1c571
22
Browse files
app.py
CHANGED
|
@@ -94,8 +94,8 @@ pipe.to("cuda", torch.bfloat16)
|
|
| 94 |
print("pipe ready.")
|
| 95 |
|
| 96 |
def prepare(edit_dict):
|
| 97 |
-
return edit_dict['background']
|
| 98 |
-
|
| 99 |
|
| 100 |
@spaces.GPU
|
| 101 |
def inference(
|
|
@@ -148,7 +148,8 @@ def inference(
|
|
| 148 |
# control_image = control_image.resize((width, height))
|
| 149 |
# control_image_torch = get_image_latent(control_image, sample_size=sample_size)[:, :, 0]
|
| 150 |
|
| 151 |
-
mask_image = edit_dict['layers'][0]
|
|
|
|
| 152 |
if mask_image is not None:
|
| 153 |
mask_image = get_image_latent(mask_image, sample_size=sample_size)[:, :1, 0]
|
| 154 |
else:
|
|
|
|
| 94 |
print("pipe ready.")
|
| 95 |
|
| 96 |
def prepare(edit_dict):
|
| 97 |
+
# return edit_dict['background']
|
| 98 |
+
return edit_dict['layers'][0]
|
| 99 |
|
| 100 |
@spaces.GPU
|
| 101 |
def inference(
|
|
|
|
| 148 |
# control_image = control_image.resize((width, height))
|
| 149 |
# control_image_torch = get_image_latent(control_image, sample_size=sample_size)[:, :, 0]
|
| 150 |
|
| 151 |
+
# mask_image = edit_dict['layers'][0]
|
| 152 |
+
mask_image = edit_dict['composite']
|
| 153 |
if mask_image is not None:
|
| 154 |
mask_image = get_image_latent(mask_image, sample_size=sample_size)[:, :1, 0]
|
| 155 |
else:
|