Skip to content

Commit 9b2c347

Browse files
committed
replace deprecated pipeline names in ONNX docs
1 parent 9b7810f commit 9b2c347

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/source/en/optimization/onnx.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ specific language governing permissions and limitations under the License.
2121

2222
## Stable Diffusion Inference
2323

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.
2525

2626
```python
2727
# make sure you're logged in with `huggingface-cli login`
28-
from diffusers import StableDiffusionOnnxPipeline
28+
from diffusers import OnnxStableDiffusionPipeline
2929

30-
pipe = StableDiffusionOnnxPipeline.from_pretrained(
30+
pipe = OnnxStableDiffusionPipeline.from_pretrained(
3131
"runwayml/stable-diffusion-v1-5",
3232
revision="onnx",
3333
provider="CUDAExecutionProvider",
@@ -40,12 +40,12 @@ image = pipe(prompt).images[0]
4040
The snippet below demonstrates how to use the ONNX runtime with the Stable Diffusion upscaling pipeline.
4141

4242
```python
43-
from diffusers import StableDiffusionOnnxPipeline
43+
from diffusers import OnnxStableDiffusionPipeline, OnnxStableDiffusionUpscalePipeline
4444

4545
prompt = "a photo of an astronaut riding a horse on mars"
4646
steps = 50
4747

48-
txt2img = StableDiffusionOnnxPipeline.from_pretrained(
48+
txt2img = OnnxStableDiffusionPipeline.from_pretrained(
4949
"runwayml/stable-diffusion-v1-5",
5050
revision="onnx",
5151
provider="CUDAExecutionProvider",

0 commit comments

Comments
 (0)