craftgamesnetwork commited on
Commit
4548375
·
verified ·
1 Parent(s): eeba3f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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
- img_url = download_image(img_url)
89
- mask_image = download_image(mask_url)
 
 
 
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
- image=img_url,
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,