Instructions to use baidu/ERNIE-Image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use baidu/ERNIE-Image with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("baidu/ERNIE-Image", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -133,8 +133,6 @@ pipe.transformer.eval()
|
|
| 133 |
pipe.vae.eval()
|
| 134 |
pipe.text_encoder.eval()
|
| 135 |
pipe.pe.eval()
|
| 136 |
-
# 如果是消费级显卡,例如 Nvidia 3090
|
| 137 |
-
# pipe.enable_model_cpu_offload()
|
| 138 |
|
| 139 |
# 设置随机种子
|
| 140 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|
|
|
|
| 133 |
pipe.vae.eval()
|
| 134 |
pipe.text_encoder.eval()
|
| 135 |
pipe.pe.eval()
|
|
|
|
|
|
|
| 136 |
|
| 137 |
# 设置随机种子
|
| 138 |
generator = torch.Generator(device="cuda").manual_seed(seed)
|