Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,6 @@ def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=30, s
|
|
| 36 |
mask_image = dict["mask"]
|
| 37 |
|
| 38 |
width, height = init_image.size
|
| 39 |
-
#mask_image = mask_image.resize(init_image.size, resample=Image.LANCZOS)
|
| 40 |
mask_image = mask_image.convert("RGBA")
|
| 41 |
data = mask_image.getdata()
|
| 42 |
new_data = []
|
|
@@ -47,7 +46,7 @@ def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=30, s
|
|
| 47 |
new_data.append(item)
|
| 48 |
|
| 49 |
mask_image.putdata(new_data)
|
| 50 |
-
|
| 51 |
output = pipe(prompt = prompt, negative_prompt=negative_prompt, image=init_image, mask_image=mask_image, guidance_scale=guidance_scale, num_inference_steps=int(steps), strength=strength, clip_skip=1)
|
| 52 |
return output.images[0].resize(init_image.size, resample=Image.LANCZOS), gr.update(visible=True)
|
| 53 |
|
|
|
|
| 36 |
mask_image = dict["mask"]
|
| 37 |
|
| 38 |
width, height = init_image.size
|
|
|
|
| 39 |
mask_image = mask_image.convert("RGBA")
|
| 40 |
data = mask_image.getdata()
|
| 41 |
new_data = []
|
|
|
|
| 46 |
new_data.append(item)
|
| 47 |
|
| 48 |
mask_image.putdata(new_data)
|
| 49 |
+
mask_image = mask_image.resize(init_image.size, resample=Image.LANCZOS)
|
| 50 |
output = pipe(prompt = prompt, negative_prompt=negative_prompt, image=init_image, mask_image=mask_image, guidance_scale=guidance_scale, num_inference_steps=int(steps), strength=strength, clip_skip=1)
|
| 51 |
return output.images[0].resize(init_image.size, resample=Image.LANCZOS), gr.update(visible=True)
|
| 52 |
|