Spongenuity commited on
Commit
ee3bf26
·
verified ·
1 Parent(s): 126f503

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -27
app.py CHANGED
@@ -220,26 +220,26 @@ def remove_tips():
220
  # ]
221
  # return case
222
 
223
- def run_for_examples(face_file, pose_file, prompt, style, negative_prompt):
224
- return generate_image(
225
- face_file,
226
- pose_file,
227
- prompt,
228
- negative_prompt,
229
- style,
230
- 20, # num_steps
231
- 0.8, # identitynet_strength_ratio
232
- 0.8, # adapter_strength_ratio
233
- 0.4, # pose_strength
234
- 0.3, # canny_strength
235
- 0.5, # depth_strength
236
- ["pose", "canny"], # controlnet_selection
237
- 5.0, # guidance_scale
238
- 42, # seed
239
- "EulerDiscreteScheduler", # scheduler
240
- False, # enable_LCM
241
- True, # enable_Face_Region
242
- )
243
 
244
  def convert_from_cv2_to_image(img: np.ndarray) -> Image:
245
  return Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
@@ -638,13 +638,13 @@ with gr.Blocks(css=css) as demo:
638
  queue=False,
639
  )
640
 
641
- gr.Examples(
642
- examples=get_example(),
643
- inputs=[face_file, pose_file, prompt, style, negative_prompt],
644
- fn=run_for_examples,
645
- outputs=[gallery, usage_tips],
646
- cache_examples=True,
647
- )
648
 
649
  gr.Markdown(article)
650
 
 
220
  # ]
221
  # return case
222
 
223
+ # def run_for_examples(face_file, pose_file, prompt, style, negative_prompt):
224
+ # return generate_image(
225
+ # face_file,
226
+ # pose_file,
227
+ # prompt,
228
+ # negative_prompt,
229
+ # style,
230
+ # 20, # num_steps
231
+ # 0.8, # identitynet_strength_ratio
232
+ # 0.8, # adapter_strength_ratio
233
+ # 0.4, # pose_strength
234
+ # 0.3, # canny_strength
235
+ # 0.5, # depth_strength
236
+ # ["pose", "canny"], # controlnet_selection
237
+ # 5.0, # guidance_scale
238
+ # 42, # seed
239
+ # "EulerDiscreteScheduler", # scheduler
240
+ # False, # enable_LCM
241
+ # True, # enable_Face_Region
242
+ # )
243
 
244
  def convert_from_cv2_to_image(img: np.ndarray) -> Image:
245
  return Image.fromarray(cv2.cvtColor(img, cv2.COLOR_BGR2RGB))
 
638
  queue=False,
639
  )
640
 
641
+ # gr.Examples(
642
+ # examples=get_example(),
643
+ # inputs=[face_file, pose_file, prompt, style, negative_prompt],
644
+ # fn=run_for_examples,
645
+ # outputs=[gallery, usage_tips],
646
+ # cache_examples=True,
647
+ # )
648
 
649
  gr.Markdown(article)
650