Spaces:
Running
on
Zero
Running
on
Zero
Alexander Bagus
commited on
Commit
·
159cd0f
1
Parent(s):
dd2a1dd
22
Browse files
app.py
CHANGED
|
@@ -148,8 +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 |
-
|
| 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:
|
|
@@ -209,6 +209,7 @@ with gr.Blocks() as demo:
|
|
| 209 |
sources=['upload', 'clipboard'],
|
| 210 |
image_mode='RGB',
|
| 211 |
type="pil",
|
|
|
|
| 212 |
label="Mask Image"
|
| 213 |
)
|
| 214 |
|
|
|
|
| 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:
|
|
|
|
| 209 |
sources=['upload', 'clipboard'],
|
| 210 |
image_mode='RGB',
|
| 211 |
type="pil",
|
| 212 |
+
image_mode= "L",
|
| 213 |
label="Mask Image"
|
| 214 |
)
|
| 215 |
|