HelloSun commited on
Commit
8bb7ab1
1 Parent(s): 1884209

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -23,13 +23,13 @@ pipeline.compile()
23
  #TypeError: LatentConsistencyPipelineMixin.__call__() got an unexpected keyword argument 'negative_prompt'
24
  #negative_prompt="easynegative,bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs, nsfw, nude, censored, "
25
 
26
- def infer(prompt):
27
 
28
  image = pipeline(
29
  prompt = prompt,
30
  #negative_prompt = negative_prompt,
31
- # guidance_scale = guidance_scale,
32
- #num_inference_steps = num_inference_steps,
33
  width = width,
34
  height = height,
35
  num_images_per_prompt=num_images,
@@ -73,12 +73,12 @@ with gr.Blocks(css=css) as demo:
73
  result = gr.Image(label="Result", show_label=False)
74
 
75
  with gr.Accordion("Advanced Settings", open=False):
76
- with gr.Row():
77
- negative_prompt = gr.Text(
78
- label="Negative prompt",
79
- max_lines=1,
80
- placeholder="Enter a negative prompt",
81
- )
82
 
83
  with gr.Row():
84
 
@@ -97,7 +97,7 @@ with gr.Blocks(css=css) as demo:
97
 
98
  run_button.click(
99
  fn = infer,
100
- inputs = [prompt],
101
  outputs = [result]
102
  )
103
 
 
23
  #TypeError: LatentConsistencyPipelineMixin.__call__() got an unexpected keyword argument 'negative_prompt'
24
  #negative_prompt="easynegative,bad anatomy, bad hands, missing fingers, extra fingers, three hands, three legs, bad arms, missing legs, missing arms, poorly drawn face, bad face, fused face, cloned face, three crus, fused feet, fused thigh, extra crus, ugly fingers, horn, cartoon, cg, 3d, unreal, animate, amputation, disconnected limbs, nsfw, nude, censored, "
25
 
26
+ def infer(prompt, num_inference_steps):
27
 
28
  image = pipeline(
29
  prompt = prompt,
30
  #negative_prompt = negative_prompt,
31
+ guidance_scale = 7.0,
32
+ num_inference_steps = num_inference_steps,
33
  width = width,
34
  height = height,
35
  num_images_per_prompt=num_images,
 
73
  result = gr.Image(label="Result", show_label=False)
74
 
75
  with gr.Accordion("Advanced Settings", open=False):
76
+ #with gr.Row():
77
+ # negative_prompt = gr.Text(
78
+ # label="Negative prompt",
79
+ # max_lines=1,
80
+ # placeholder="Enter a negative prompt",
81
+ # )
82
 
83
  with gr.Row():
84
 
 
97
 
98
  run_button.click(
99
  fn = infer,
100
+ inputs = [prompt, num_inference_steps],
101
  outputs = [result]
102
  )
103