File size: 581 Bytes
7e639c8
 
 
bcf58fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
license: creativeml-openrail-m
---
How to use:
```python
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]
```