Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ model_id = "OpenVINO/LCM_Dreamshaper_v7-int8-ov"
|
|
14 |
#pipeline = OVLatentConsistencyModelPipeline.from_pretrained(model_id, compile=False, safety_checker=safety_checker)
|
15 |
pipeline = OVLatentConsistencyModelPipeline.from_pretrained(model_id, compile=False)
|
16 |
|
17 |
-
batch_size, num_images, height, width = 1,
|
18 |
pipeline.reshape(batch_size=batch_size, height=height, width=width, num_images_per_prompt=num_images)
|
19 |
pipeline.load_textual_inversion("./badhandv4.pt", "badhandv4")
|
20 |
pipeline.compile()
|
@@ -32,7 +32,7 @@ def infer(prompt, num_inference_steps):
|
|
32 |
width = width,
|
33 |
height = height,
|
34 |
num_images_per_prompt=num_images,
|
35 |
-
).images
|
36 |
|
37 |
return image
|
38 |
|
|
|
14 |
#pipeline = OVLatentConsistencyModelPipeline.from_pretrained(model_id, compile=False, safety_checker=safety_checker)
|
15 |
pipeline = OVLatentConsistencyModelPipeline.from_pretrained(model_id, compile=False)
|
16 |
|
17 |
+
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.load_textual_inversion("./badhandv4.pt", "badhandv4")
|
20 |
pipeline.compile()
|
|
|
32 |
width = width,
|
33 |
height = height,
|
34 |
num_images_per_prompt=num_images,
|
35 |
+
).images[0]
|
36 |
|
37 |
return image
|
38 |
|