Text-to-Image
Diffusers
Chinese
AltDiffusionPipeline
stable-diffusion
stable-diffusion-diffusers
bilingual
Chinese
en
English
Instructions to use BAAI/AltDiffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use BAAI/AltDiffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("BAAI/AltDiffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -67,7 +67,11 @@ The following weights are automatically downloaded from [here](https://model.baa
|
|
| 67 |
|
| 68 |
## 🧨Diffusers Example
|
| 69 |
|
| 70 |
-
**AltDiffusion**
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
You can see the documentation page [here](https://huggingface.co/docs/diffusers/main/en/api/pipelines/alt_diffusion).
|
| 72 |
|
| 73 |
The following example will use the fast DPM scheduler to generate an image in ca. 2 seconds on a V100.
|
|
@@ -92,6 +96,8 @@ image.save("./alt.png")
|
|
| 92 |
|
| 93 |

|
| 94 |
|
|
|
|
|
|
|
| 95 |
以下示例将为文本输入`Anime portrait of natalie portman as an anime girl by stanley artgerm lau, wlop, rossdraws, james jean, andrei riabovitchev, marc simonetti, and sakimichan, trending on artstation` 在目录`./AltDiffusionOutputs`下生成图片结果。
|
| 96 |
|
| 97 |
The following example will generate image results for text input `Anime portrait of natalie portman as an anime girl by stanley artgerm lau, wlop, rossdraws, james jean, andrei riabovitchev, marc simonetti, and sakimichan, trending on artstation` under the default output directory `./AltDiffusionOutputs`
|
|
|
|
| 67 |
|
| 68 |
## 🧨Diffusers Example
|
| 69 |
|
| 70 |
+
**AltDiffusion** 已被添加到 🧨Diffusers!
|
| 71 |
+
您可以在 [此处](https://huggingface.co/docs/diffusers/main/en/api/pipelines/alt_diffusion) 查看文档页面。
|
| 72 |
+
|
| 73 |
+
以下示例将使用fast DPM 调度程序生成图像, 在V100 上耗时大约为 2 秒。
|
| 74 |
+
|
| 75 |
You can see the documentation page [here](https://huggingface.co/docs/diffusers/main/en/api/pipelines/alt_diffusion).
|
| 76 |
|
| 77 |
The following example will use the fast DPM scheduler to generate an image in ca. 2 seconds on a V100.
|
|
|
|
| 96 |
|
| 97 |

|
| 98 |
|
| 99 |
+
## FlagAI Example
|
| 100 |
+
|
| 101 |
以下示例将为文本输入`Anime portrait of natalie portman as an anime girl by stanley artgerm lau, wlop, rossdraws, james jean, andrei riabovitchev, marc simonetti, and sakimichan, trending on artstation` 在目录`./AltDiffusionOutputs`下生成图片结果。
|
| 102 |
|
| 103 |
The following example will generate image results for text input `Anime portrait of natalie portman as an anime girl by stanley artgerm lau, wlop, rossdraws, james jean, andrei riabovitchev, marc simonetti, and sakimichan, trending on artstation` under the default output directory `./AltDiffusionOutputs`
|