Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -73,13 +73,19 @@ def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=30, s
|
|
| 73 |
strength=strength,
|
| 74 |
clip_skip=1
|
| 75 |
)
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
print("
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
|
| 85 |
css = '''
|
|
|
|
| 73 |
strength=strength,
|
| 74 |
clip_skip=1
|
| 75 |
)
|
| 76 |
+
inpainted_image = output.images[0]
|
| 77 |
+
|
| 78 |
+
# Combine the original and inpainted images using the mask
|
| 79 |
+
combined_image = Image.composite(inpainted_image, init_image, mask_image.split()[3])
|
| 80 |
+
|
| 81 |
+
print("Positive:", prompt)
|
| 82 |
+
print("Negative:", negative_prompt)
|
| 83 |
+
print("Guidance_scale:", guidance_scale)
|
| 84 |
+
print("Steps:", steps)
|
| 85 |
+
print("Strength:", strength)
|
| 86 |
+
print("Scheduler:", scheduler)
|
| 87 |
+
|
| 88 |
+
return combined_image.resize(init_image.size, resample=Image.LANCZOS), gr.update(visible=True)
|
| 89 |
|
| 90 |
|
| 91 |
css = '''
|