Instructions to use baidu/ERNIE-Image-Turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use baidu/ERNIE-Image-Turbo 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-Turbo", 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
|
@@ -108,7 +108,7 @@ torch.backends.cudnn.benchmark = False
|
|
| 108 |
|
| 109 |
# 加载 pipeline
|
| 110 |
pipe = ErnieImagePipeline.from_pretrained(
|
| 111 |
-
"baidu/ERNIE-Image",
|
| 112 |
torch_dtype=torch.bfloat16,
|
| 113 |
)
|
| 114 |
pipe = pipe.to("cuda")
|
|
|
|
| 108 |
|
| 109 |
# 加载 pipeline
|
| 110 |
pipe = ErnieImagePipeline.from_pretrained(
|
| 111 |
+
"baidu/ERNIE-Image-Turbo",
|
| 112 |
torch_dtype=torch.bfloat16,
|
| 113 |
)
|
| 114 |
pipe = pipe.to("cuda")
|