"vscode:/vscode.git/clone" did not exist on "bf40d7d82a732a35e0f5b907e59064ee080cde9f"
Unverified Commit 94b27fb8 authored by shunxing1234's avatar shunxing1234 Committed by GitHub
Browse files

change the sample model (#1352)

* Update alt_diffusion.mdx

* Update alt_diffusion.mdx
parent ab1f01e6
...@@ -32,7 +32,7 @@ The abstract of the paper is the following: ...@@ -32,7 +32,7 @@ The abstract of the paper is the following:
- *Run AltDiffusion* - *Run AltDiffusion*
AltDiffusion can be tested very easily with the [`AltDiffusionPipeline`], [`AltDiffusionImg2ImgPipeline`] and the `"BAAI/AltDiffusion"` checkpoint exactly in the same way it is shown in the [Conditional Image Generation Guide](./using-diffusers/conditional_image_generation) and the [Image-to-Image Generation Guide](./using-diffusers/img2img). AltDiffusion can be tested very easily with the [`AltDiffusionPipeline`], [`AltDiffusionImg2ImgPipeline`] and the `"BAAI/AltDiffusion-m9"` checkpoint exactly in the same way it is shown in the [Conditional Image Generation Guide](./using-diffusers/conditional_image_generation) and the [Image-to-Image Generation Guide](./using-diffusers/img2img).
- *How to load and use different schedulers.* - *How to load and use different schedulers.*
...@@ -42,12 +42,12 @@ To use a different scheduler, you can either change it via the [`ConfigMixin.fro ...@@ -42,12 +42,12 @@ To use a different scheduler, you can either change it via the [`ConfigMixin.fro
```python ```python
>>> from diffusers import AltDiffusionPipeline, EulerDiscreteScheduler >>> from diffusers import AltDiffusionPipeline, EulerDiscreteScheduler
>>> pipeline = AltDiffusionPipeline.from_pretrained("BAAI/AltDiffusion") >>> pipeline = AltDiffusionPipeline.from_pretrained("BAAI/AltDiffusion-m9")
>>> pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config) >>> pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config)
>>> # or >>> # or
>>> euler_scheduler = EulerDiscreteScheduler.from_pretrained("BAAI/AltDiffusion", subfolder="scheduler") >>> euler_scheduler = EulerDiscreteScheduler.from_pretrained("BAAI/AltDiffusion-m9", subfolder="scheduler")
>>> pipeline = AltDiffusionPipeline.from_pretrained("BAAI/AltDiffusion", scheduler=euler_scheduler) >>> pipeline = AltDiffusionPipeline.from_pretrained("BAAI/AltDiffusion-m9", scheduler=euler_scheduler)
``` ```
...@@ -61,7 +61,7 @@ If you want to use all possible use cases in a single `DiffusionPipeline` we rec ...@@ -61,7 +61,7 @@ If you want to use all possible use cases in a single `DiffusionPipeline` we rec
... AltDiffusionImg2ImgPipeline, ... AltDiffusionImg2ImgPipeline,
... ) ... )
>>> text2img = AltDiffusionPipeline.from_pretrained("BAAI/AltDiffusion") >>> text2img = AltDiffusionPipeline.from_pretrained("BAAI/AltDiffusion-m9")
>>> img2img = AltDiffusionImg2ImgPipeline(**text2img.components) >>> img2img = AltDiffusionImg2ImgPipeline(**text2img.components)
>>> # now you can use text2img(...) and img2img(...) just like the call methods of each respective pipeline >>> # now you can use text2img(...) and img2img(...) just like the call methods of each respective pipeline
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment