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
|
@@ -39,12 +39,26 @@ Thanks to its relatively compact model size, ERNIE-Image can be deployed on **co
|
|
| 39 |
|
| 40 |
|
| 41 |
### Showcase
|
| 42 |
-
<
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
|
|
|
| 48 |
<div class="masonry">
|
| 49 |
<article class="card">
|
| 50 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/6358acfe0e4fef21982a929b/ukAjGbYZwG4jPRRs9UgJ0.jpeg">
|
|
@@ -57,6 +71,7 @@ Thanks to its relatively compact model size, ERNIE-Image can be deployed on **co
|
|
| 57 |
</article>
|
| 58 |
</div>
|
| 59 |
</section>
|
|
|
|
| 60 |
## Uses
|
| 61 |
|
| 62 |
### Installation & Download
|
|
|
|
| 39 |
|
| 40 |
|
| 41 |
### Showcase
|
| 42 |
+
<style>
|
| 43 |
+
.masonry {
|
| 44 |
+
column-count: 2; /* 两列 */
|
| 45 |
+
column-gap: 12px;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.card {
|
| 49 |
+
break-inside: avoid; /* 防止卡片被切断 */
|
| 50 |
+
margin-bottom: 12px;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.card img {
|
| 54 |
+
width: 100%; /* 宽度统一 */
|
| 55 |
+
height: auto; /* 高度自适应(关键) */
|
| 56 |
+
display: block;
|
| 57 |
+
border-radius: 8px;
|
| 58 |
+
}
|
| 59 |
+
</style>
|
| 60 |
|
| 61 |
+
<section id="shape-3160722256177163633" class="tab-panel active">
|
| 62 |
<div class="masonry">
|
| 63 |
<article class="card">
|
| 64 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/6358acfe0e4fef21982a929b/ukAjGbYZwG4jPRRs9UgJ0.jpeg">
|
|
|
|
| 71 |
</article>
|
| 72 |
</div>
|
| 73 |
</section>
|
| 74 |
+
|
| 75 |
## Uses
|
| 76 |
|
| 77 |
### Installation & Download
|