Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -85,8 +85,11 @@ def generate(
|
|
85 |
init_image = Image.open(BytesIO(response.content)).convert("RGB")
|
86 |
init_image = init_image.resize((width, height))
|
87 |
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
90 |
|
91 |
if use_lora:
|
92 |
pipe.load_lora_weights(lora)
|
@@ -113,7 +116,7 @@ def generate(
|
|
113 |
if use_inpainting:
|
114 |
images = pipe(
|
115 |
prompt=prompt,
|
116 |
-
|
117 |
mask_image=mask_url,
|
118 |
strength=strength_img2img,
|
119 |
negative_prompt=negative_prompt,
|
|
|
85 |
init_image = Image.open(BytesIO(response.content)).convert("RGB")
|
86 |
init_image = init_image.resize((width, height))
|
87 |
|
88 |
+
response = requests.get(img_url)
|
89 |
+
image_init = Image.open(BytesIO(response.content)).convert("RGB")
|
90 |
+
|
91 |
+
response = requests.get(mask_url)
|
92 |
+
mask_image = Image.open(BytesIO(response.content)).convert("RGB")
|
93 |
|
94 |
if use_lora:
|
95 |
pipe.load_lora_weights(lora)
|
|
|
116 |
if use_inpainting:
|
117 |
images = pipe(
|
118 |
prompt=prompt,
|
119 |
+
image_init=img_url,
|
120 |
mask_image=mask_url,
|
121 |
strength=strength_img2img,
|
122 |
negative_prompt=negative_prompt,
|