LPX55 commited on
Commit
3a61245
·
verified ·
1 Parent(s): 79f4f40

Update app_inpaint2.py

Browse files
Files changed (1) hide show
  1. app_inpaint2.py +3 -3
app_inpaint2.py CHANGED
@@ -53,7 +53,7 @@ def load_default_pipeline():
53
  """仅保留,但当前 Inpaint 逻辑未直接使用,可以删除,但保留以防将来扩展。"""
54
  global pipe
55
  pipe = StableDiffusionXLFillPipeline.from_pretrained(
56
- "SG161222/RealVisXL_V5.0_Lightning",
57
  torch_dtype=torch.float16,
58
  vae=vae,
59
  controlnet=model,
@@ -145,10 +145,10 @@ def fill_image(prompt, image, model_selection, paste_back):
145
  # 将 image_out 粘贴到 final_output 中,仅在 binary_mask 为 255 的区域(即修复区域)
146
  final_output.paste(image_out_rgba, (0, 0), binary_mask)
147
 
148
- yield final_output, cnet_image
149
  else:
150
  # 如果不 paste back,只返回生成的修复图像
151
- yield image_out, cnet_image
152
 
153
  def clear_result():
154
  return gr.update(value=None)
 
53
  """仅保留,但当前 Inpaint 逻辑未直接使用,可以删除,但保留以防将来扩展。"""
54
  global pipe
55
  pipe = StableDiffusionXLFillPipeline.from_pretrained(
56
+ "GraydientPlatformAPI/lustify-lightning",
57
  torch_dtype=torch.float16,
58
  vae=vae,
59
  controlnet=model,
 
145
  # 将 image_out 粘贴到 final_output 中,仅在 binary_mask 为 255 的区域(即修复区域)
146
  final_output.paste(image_out_rgba, (0, 0), binary_mask)
147
 
148
+ yield cnet_image, final_output
149
  else:
150
  # 如果不 paste back,只返回生成的修复图像
151
+ yield cnet_image, image_out
152
 
153
  def clear_result():
154
  return gr.update(value=None)