rippertnt's picture
Upload 4 files
2d5a280 verified
from optimum.intel.openvino import OVLatentConsistencyModelPipeline
import time
import datasets
model_id = "./circulus/canvers-real-v3.8.1-lcm"
prompt = "sailing ship in storm by Rembrandt"
pipeline = OVLatentConsistencyModelPipeline.from_pretrained(model_id, export=True)
start = time.time()
print("inference")
image = pipeline(prompt, num_inference_steps=4, guidance_scale=8.0, height=512, width=512).images[0]
#image.save("test.jpg")
print(time.time() - start )
# Don't forget to save the exported model
pipeline.save_pretrained("./circulus/canvers-real-v3.8.1-lcm-ov")