Spaces:
Build error
Build error
Commit
·
9749dd2
1
Parent(s):
8db9b24
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,6 @@ pipe_tome_int8 = OVStableDiffusionPipeline.from_pretrained("OpenVINO/stable-diff
|
|
21 |
pipe_tome_int8.reshape(batch_size=1, height=512, width=512, num_images_per_prompt=1)
|
22 |
pipe_tome_int8.compile()
|
23 |
|
24 |
-
prompt = "cartoon bird"
|
25 |
-
|
26 |
pipes = {
|
27 |
"Torch fp32"
|
28 |
"OpenVINO fp32": pipe_fp32,
|
@@ -30,7 +28,7 @@ pipes = {
|
|
30 |
"OpenVINO merged and quantized": pipe_tome_int8
|
31 |
}
|
32 |
|
33 |
-
def generate(
|
34 |
pipe = pipes[option]
|
35 |
start_time = time.time()
|
36 |
output = pipe(prompt, num_inference_steps=50, output_type="pil")
|
|
|
21 |
pipe_tome_int8.reshape(batch_size=1, height=512, width=512, num_images_per_prompt=1)
|
22 |
pipe_tome_int8.compile()
|
23 |
|
|
|
|
|
24 |
pipes = {
|
25 |
"Torch fp32"
|
26 |
"OpenVINO fp32": pipe_fp32,
|
|
|
28 |
"OpenVINO merged and quantized": pipe_tome_int8
|
29 |
}
|
30 |
|
31 |
+
def generate(prompt, option):
|
32 |
pipe = pipes[option]
|
33 |
start_time = time.time()
|
34 |
output = pipe(prompt, num_inference_steps=50, output_type="pil")
|