@@ -21,13 +21,13 @@ specific language governing permissions and limitations under the License.
21
21
22
22
## Stable Diffusion Inference
23
23
24
- The snippet below demonstrates how to use the ONNX runtime. You need to use `StableDiffusionOnnxPipeline ` instead of `StableDiffusionPipeline`. You also need to download the weights from the `onnx` branch of the repository, and indicate the runtime provider you want to use.
24
+ The snippet below demonstrates how to use the ONNX runtime. You need to use `OnnxStableDiffusionPipeline ` instead of `StableDiffusionPipeline`. You also need to download the weights from the `onnx` branch of the repository, and indicate the runtime provider you want to use.
25
25
26
26
```python
27
27
# make sure you're logged in with `huggingface-cli login`
28
- from diffusers import StableDiffusionOnnxPipeline
28
+ from diffusers import OnnxStableDiffusionPipeline
29
29
30
- pipe = StableDiffusionOnnxPipeline .from_pretrained(
30
+ pipe = OnnxStableDiffusionPipeline .from_pretrained(
31
31
" runwayml/stable-diffusion-v1-5" ,
32
32
revision = " onnx" ,
33
33
provider = " CUDAExecutionProvider" ,
@@ -40,12 +40,12 @@ image = pipe(prompt).images[0]
40
40
The snippet below demonstrates how to use the ONNX runtime with the Stable Diffusion upscaling pipeline.
41
41
42
42
```python
43
- from diffusers import StableDiffusionOnnxPipeline
43
+ from diffusers import OnnxStableDiffusionPipeline, OnnxStableDiffusionUpscalePipeline
44
44
45
45
prompt = " a photo of an astronaut riding a horse on mars"
46
46
steps = 50
47
47
48
- txt2img = StableDiffusionOnnxPipeline .from_pretrained(
48
+ txt2img = OnnxStableDiffusionPipeline .from_pretrained(
49
49
" runwayml/stable-diffusion-v1-5" ,
50
50
revision = " onnx" ,
51
51
provider = " CUDAExecutionProvider" ,
0 commit comments