Views
No views yet
pip install optimum[openvino]from optimum.intel.openvino import OVDiffusionPipeline
model_id = "OpenVINO/LCM_Dreamshaper_v7-fp16-ov"
pipeline = OVDiffusionPipeline.from_pretrained(model_id)
prompt = "sailing ship in storm by Rembrandt"
images = pipeline(prompt, num_inference_steps=4).imagespip install huggingface_hub
pip install -U --pre --extra-index-url https://storage.openvinotoolkit.org/simple/wheels/nightly openvino openvino-tokenizers openvino-genaiimport huggingface_hub as hf_hub
model_id = "OpenVINO/LCM_Dreamshaper_v7-fp16-ov"
model_path = "LCM_Dreamshaper_v7-fp16-ov"
hf_hub.snapshot_download(model_id, local_dir=model_path)
import openvino_genai as ov_genai
from PIL import Image
device = "CPU"
pipe = ov_genai.Text2ImagePipeline(model_path, device)
prompt = "sailing ship in storm by Rembrandt"
image_tensor = pipe.generate(prompt, num_inference_steps=4)
image = Image.fromarray(image_tensor.data[0])