XXX2333's picture
Update README.md
b8f7138 verified
metadata
library_name: diffusers

from openvino.runtime import get_version

print(get_version()) from optimum.intel import OVStableDiffusionXLPipeline from diffusers import DiffusionPipeline, LCMScheduler import time

openvion版本要求高,但是不要用最新的

model_path = './ov-dmd-1step' pipeline = OVStableDiffusionXLPipeline.from_pretrained( model_path, ov_config={"CACHE_DIR": "."}, )

pipeline.scheduler = LCMScheduler.from_config(pipeline.scheduler.config) prompt = "a close-up picture of an old man standing in the rain"

image = pipeline(prompt = prompt, num_inference_steps=1,guidance_scale=0, timesteps=[399]).images[0] image.save("ovgenerated_ship.png")