HelloSun commited on
Commit
0d9dabb
1 Parent(s): 14ac017

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -18,11 +18,11 @@ batch_size, num_images, height, width = 1, 1, 512, 512
18
  pipeline.reshape(batch_size=batch_size, height=height, width=width, num_images_per_prompt=num_images)
19
  pipeline.compile()
20
 
21
- def infer(prompt,negative_prompt, num_inference_steps):
22
 
23
  image = pipeline(
24
  prompt = prompt,
25
- negative_prompt = negative_prompt,
26
  # guidance_scale = guidance_scale,
27
  num_inference_steps = num_inference_steps,
28
  width = width,
@@ -68,13 +68,13 @@ with gr.Blocks(css=css) as demo:
68
  result = gr.Image(label="Result", show_label=False)
69
 
70
  with gr.Accordion("Advanced Settings", open=False):
71
- with gr.Row():
72
- negative_prompt = gr.Text(
73
- label="Negative prompt",
74
- max_lines=1,
75
- placeholder="Enter a negative prompt",
76
- visible=True,
77
- )
78
 
79
  with gr.Row():
80
 
@@ -93,7 +93,7 @@ with gr.Blocks(css=css) as demo:
93
 
94
  run_button.click(
95
  fn = infer,
96
- inputs = [prompt, negative_prompt,num_inference_steps],
97
  outputs = [result]
98
  )
99
 
 
18
  pipeline.reshape(batch_size=batch_size, height=height, width=width, num_images_per_prompt=num_images)
19
  pipeline.compile()
20
 
21
+ def infer(prompt, num_inference_steps):
22
 
23
  image = pipeline(
24
  prompt = prompt,
25
+ #negative_prompt = negative_prompt, #no negative_prompt keyword in LatentConsistencyPipelineMixin
26
  # guidance_scale = guidance_scale,
27
  num_inference_steps = num_inference_steps,
28
  width = width,
 
68
  result = gr.Image(label="Result", show_label=False)
69
 
70
  with gr.Accordion("Advanced Settings", open=False):
71
+ #with gr.Row():
72
+ # negative_prompt = gr.Text(
73
+ # label="Negative prompt",
74
+ # max_lines=1,
75
+ # placeholder="Enter a negative prompt",
76
+ # visible=True,
77
+ # )
78
 
79
  with gr.Row():
80
 
 
93
 
94
  run_button.click(
95
  fn = infer,
96
+ inputs = [prompt, num_inference_steps],
97
  outputs = [result]
98
  )
99