|
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] |
|
|
|
print(time.time() - start ) |
|
|
|
|
|
pipeline.save_pretrained("./circulus/canvers-real-v3.8.1-lcm-ov") |
|
|