How to use:
from diffusers import StableDiffusionOnnxPipeline, PNDMScheduler
model_path = r'ShadowPower/waifu-diffusion-diffusers-onnx-v1-3'
scheduler = PNDMScheduler(
beta_start=0.00085,
beta_end=0.012,
beta_schedule='scaled_linear',
skip_prk_steps=True,
tensor_format='np'
)
pipe = StableDiffusionOnnxPipeline.from_pretrained(
model_path,
provider="CPUExecutionProvider",
scheduler=scheduler
)
if __name__ == '__main__':
prompt = "1girl, hakurei reimu"
image = pipe(prompt).images[0]