Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ from optimum.intel import OVStableDiffusionPipeline
|
|
4 |
model_id = "yujiepan/dreamshaper-8-lcm-openvino-w8a8"
|
5 |
pipeline = OVStableDiffusionPipeline.from_pretrained(model_id, device='CPU')
|
6 |
pipeline.sampler = "dpm++2s_a"
|
|
|
7 |
|
8 |
def infer(prompt, num_inference_steps):
|
9 |
image = pipeline(
|
@@ -55,7 +56,7 @@ with gr.Blocks(css=css) as demo:
|
|
55 |
gr.Examples(
|
56 |
examples=examples,
|
57 |
fn=infer,
|
58 |
-
inputs=[prompt,
|
59 |
outputs=[result]
|
60 |
)
|
61 |
|
|
|
4 |
model_id = "yujiepan/dreamshaper-8-lcm-openvino-w8a8"
|
5 |
pipeline = OVStableDiffusionPipeline.from_pretrained(model_id, device='CPU')
|
6 |
pipeline.sampler = "dpm++2s_a"
|
7 |
+
num_inference_steps = 28
|
8 |
|
9 |
def infer(prompt, num_inference_steps):
|
10 |
image = pipeline(
|
|
|
56 |
gr.Examples(
|
57 |
examples=examples,
|
58 |
fn=infer,
|
59 |
+
inputs=[prompt, num_inference_steps],
|
60 |
outputs=[result]
|
61 |
)
|
62 |
|