LPX55 commited on
Commit
5401180
·
verified ·
1 Parent(s): a60f7b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -14,7 +14,8 @@ MODELS = {
14
  "RealVisXL V5.0 Lightning": "SG161222/RealVisXL_V5.0_Lightning",
15
  "Lustify Lightning": "GraydientPlatformAPI/lustify-lightning",
16
  "Juggernaut XL Lightning": "RunDiffusion/Juggernaut-XL-Lightning",
17
- "Juggernaut-XL-V9-GE-RDPhoto2": "AiWise/Juggernaut-XL-V9-GE-RDPhoto2-Lightning_4S"
 
18
  }
19
 
20
  config_file = hf_hub_download(
@@ -199,7 +200,8 @@ def inpaint(prompt, image, inpaint_model, paste_back):
199
  ).to("cuda")
200
  mask = Image.fromarray(image["mask"]).convert("L")
201
  image = Image.fromarray(image["image"])
202
- result = pipe(prompt=prompt, image=image, mask_image=mask).images[0]
 
203
  if paste_back:
204
  result.paste(image, (0, 0), Image.fromarray(255 - np.array(mask)))
205
  return result
@@ -211,7 +213,7 @@ def outpaint(image, width, height, overlap_percentage, num_inference_steps, resi
211
  alignment = "Middle"
212
  cnet_image = background.copy()
213
  cnet_image.paste(0, (0, 0), mask)
214
- final_prompt = f"{prompt_input} , high quality, 4k"
215
  (
216
  prompt_embeds,
217
  negative_prompt_embeds,
 
14
  "RealVisXL V5.0 Lightning": "SG161222/RealVisXL_V5.0_Lightning",
15
  "Lustify Lightning": "GraydientPlatformAPI/lustify-lightning",
16
  "Juggernaut XL Lightning": "RunDiffusion/Juggernaut-XL-Lightning",
17
+ "Juggernaut-XL-V9-GE-RDPhoto2": "AiWise/Juggernaut-XL-V9-GE-RDPhoto2-Lightning_4S",
18
+ "SatPony-Lightning": "John6666/satpony-lightning-v2-sdxl"
19
  }
20
 
21
  config_file = hf_hub_download(
 
200
  ).to("cuda")
201
  mask = Image.fromarray(image["mask"]).convert("L")
202
  image = Image.fromarray(image["image"])
203
+ inpaint_final_prompt = f"score_9, score_8_up, score_7_up, {prompt}"
204
+ result = pipe(prompt=inpaint_final_prompt, image=image, mask_image=mask).images[0]
205
  if paste_back:
206
  result.paste(image, (0, 0), Image.fromarray(255 - np.array(mask)))
207
  return result
 
213
  alignment = "Middle"
214
  cnet_image = background.copy()
215
  cnet_image.paste(0, (0, 0), mask)
216
+ final_prompt = f"score_9, score_8_up, score_7_up, {prompt_input} , high quality, 4k"
217
  (
218
  prompt_embeds,
219
  negative_prompt_embeds,