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,150 +39,24 @@ 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 |
-
<
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
.pill { display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:999px; border:1px solid var(--line); background:var(--panel); }
|
| 61 |
-
.tabs { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
|
| 62 |
-
.tab-btn { border:1px solid var(--line); background:var(--panel); color:var(--text); padding:8px 12px; border-radius:999px; cursor:pointer; }
|
| 63 |
-
.tab-btn:hover { border-color:var(--accent); }
|
| 64 |
-
.tab-btn.active { background:var(--accent); color:#08111d; border-color:var(--accent); font-weight:600; }
|
| 65 |
-
main { padding:20px; }
|
| 66 |
-
.tab-panel { display:none; }
|
| 67 |
-
.tab-panel.active { display:block; }
|
| 68 |
-
.task-head { margin-bottom:16px; padding:16px; background:linear-gradient(180deg, var(--panel-2), var(--panel)); border:1px solid var(--line); border-radius:14px; }
|
| 69 |
-
.task-title { font-size:16px; font-weight:700; margin-bottom:8px; }
|
| 70 |
-
.seed-prompt, .small { white-space:pre-wrap; word-break:break-word; }
|
| 71 |
-
.task-sub { color:var(--muted); font-size:12px; margin-top:8px; }
|
| 72 |
-
.masonry { column-count:6; column-gap:16px; }
|
| 73 |
-
.card { break-inside:avoid; margin:0 0 16px; background:var(--panel); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
|
| 74 |
-
.card img { display:block; width:100%; height:auto; background:#0b0d12; }
|
| 75 |
-
.card-body { padding:12px; }
|
| 76 |
-
.tagline { color:var(--muted); font-size:12px; margin-bottom:8px; }
|
| 77 |
-
.prompt { margin:0 0 8px; white-space:pre-wrap; word-break:break-word; }
|
| 78 |
-
details { border-top:1px solid var(--line); padding-top:8px; }
|
| 79 |
-
summary { cursor:pointer; color:var(--accent); }
|
| 80 |
-
.empty { padding:24px; border:1px solid var(--line); border-radius:14px; background:var(--panel); color:var(--muted); }
|
| 81 |
-
.tools { margin-top:12px; display:flex; gap:8px; flex-wrap:wrap; }
|
| 82 |
-
.tool-btn { display:inline-flex; align-items:center; padding:8px 12px; border-radius:10px; border:1px solid var(--line); background:var(--panel); color:var(--text); cursor:pointer; }
|
| 83 |
-
.tool-btn:hover { border-color:var(--accent-2); }
|
| 84 |
-
@media (max-width: 1800px) { .masonry { column-count:5; } }
|
| 85 |
-
@media (max-width: 1500px) { .masonry { column-count:4; } }
|
| 86 |
-
@media (max-width: 1200px) { .masonry { column-count:3; } }
|
| 87 |
-
@media (max-width: 800px) { .masonry { column-count:2; } }
|
| 88 |
-
@media (max-width: 560px) { .masonry { column-count:1; } header, main { padding-left:12px; padding-right:12px; } }
|
| 89 |
-
</style>
|
| 90 |
-
</head>
|
| 91 |
-
<body>
|
| 92 |
-
<header>
|
| 93 |
-
<h1>PE Gallery Tag LMDB Full Flat v1</h1>
|
| 94 |
-
<div class="meta">
|
| 95 |
-
<span class="pill">shape tabs: 10</span>
|
| 96 |
-
<span class="pill">generated images: 680</span>
|
| 97 |
-
<span class="pill">success log: tag_lmdb_model_rewrites_full_flat_v1/pe_generation_v1/generation_successes_v1.jsonl</span>
|
| 98 |
-
</div>
|
| 99 |
-
<div class="tools">
|
| 100 |
-
<button class="tool-btn" type="button" onclick="location.reload()">Refresh</button>
|
| 101 |
-
<a class="tool-btn" href="/api/state" target="_blank" rel="noreferrer">API State</a>
|
| 102 |
-
</div>
|
| 103 |
-
<div class="tabs">
|
| 104 |
-
|
| 105 |
-
<button class="tab-btn active" data-tab="shape-3160722256177163633">
|
| 106 |
-
单帧场景图
|
| 107 |
-
</button>
|
| 108 |
-
|
| 109 |
-
<button class="tab-btn" data-tab="shape-2427741713454321534">
|
| 110 |
-
多帧叙事图
|
| 111 |
-
</button>
|
| 112 |
-
|
| 113 |
-
<button class="tab-btn" data-tab="shape-2966923477367583816">
|
| 114 |
-
海报 / 封面 / KV
|
| 115 |
-
</button>
|
| 116 |
-
|
| 117 |
-
<button class="tab-btn" data-tab="shape-9135981331395845469">
|
| 118 |
-
宣传 / 广告物料
|
| 119 |
-
</button>
|
| 120 |
-
|
| 121 |
-
<button class="tab-btn" data-tab="shape-4864532815591085860">
|
| 122 |
-
文档页面类
|
| 123 |
-
</button>
|
| 124 |
-
|
| 125 |
-
<button class="tab-btn" data-tab="shape-6815415805710817686">
|
| 126 |
-
图表 / 结构图类
|
| 127 |
-
</button>
|
| 128 |
-
|
| 129 |
-
<button class="tab-btn" data-tab="shape-1588915976006691555">
|
| 130 |
-
界面 / 截图类
|
| 131 |
-
</button>
|
| 132 |
-
|
| 133 |
-
<button class="tab-btn" data-tab="shape-5697793483149824864">
|
| 134 |
-
设定板 / 说明板
|
| 135 |
-
</button>
|
| 136 |
-
|
| 137 |
-
<button class="tab-btn" data-tab="shape-1862396184169292215">
|
| 138 |
-
实物载体 Mockup
|
| 139 |
-
</button>
|
| 140 |
-
|
| 141 |
-
<button class="tab-btn" data-tab="shape-3673089671751230849">
|
| 142 |
-
素材集 / 元素表
|
| 143 |
-
</button>
|
| 144 |
-
|
| 145 |
-
</div>
|
| 146 |
-
</header>
|
| 147 |
-
<main>
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
<section id="shape-3160722256177163633" class="tab-panel active">
|
| 151 |
-
<div class="task-head">
|
| 152 |
-
<div class="task-title">单帧场景图</div>
|
| 153 |
-
|
| 154 |
-
<div class="task-sub">images: 100 | output shape: 单帧场景图 | source tasks: 100 | models: 15</div>
|
| 155 |
-
</div>
|
| 156 |
-
<div class="masonry">
|
| 157 |
-
<article class="card">
|
| 158 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/6358acfe0e4fef21982a929b/ukAjGbYZwG4jPRRs9UgJ0.jpeg" alt="generated image">
|
| 159 |
-
</article>
|
| 160 |
-
<article class="card">
|
| 161 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/6358acfe0e4fef21982a929b/nD1aI60oXzAuGnhBA0P8T.jpeg" alt="generated image">
|
| 162 |
-
</article>
|
| 163 |
-
<article class="card">
|
| 164 |
-
<img src="https://cdn-uploads.huggingface.co/production/uploads/6358acfe0e4fef21982a929b/YveUuXuSIiBWDs-U_mYqI.jpeg" alt="generated image">
|
| 165 |
-
</article>
|
| 166 |
-
</div>
|
| 167 |
-
</section>
|
| 168 |
-
|
| 169 |
-
</main>
|
| 170 |
-
<script>
|
| 171 |
-
const buttons = Array.from(document.querySelectorAll('.tab-btn'));
|
| 172 |
-
const panels = Array.from(document.querySelectorAll('.tab-panel'));
|
| 173 |
-
function activate(id) {
|
| 174 |
-
buttons.forEach(btn => btn.classList.toggle('active', btn.dataset.tab === id));
|
| 175 |
-
panels.forEach(panel => panel.classList.toggle('active', panel.id === id));
|
| 176 |
-
if (id) history.replaceState(null, '', '#' + id);
|
| 177 |
-
}
|
| 178 |
-
buttons.forEach(btn => btn.addEventListener('click', () => activate(btn.dataset.tab)));
|
| 179 |
-
const initial = location.hash ? location.hash.slice(1) : (buttons[0] ? buttons[0].dataset.tab : null);
|
| 180 |
-
if (initial) activate(initial);
|
| 181 |
-
</script>
|
| 182 |
-
</body>
|
| 183 |
-
</html>
|
| 184 |
-
</iframe>
|
| 185 |
-
|
| 186 |
## Uses
|
| 187 |
|
| 188 |
### Installation & Download
|
|
|
|
| 39 |
|
| 40 |
|
| 41 |
### Showcase
|
| 42 |
+
<section id="shape-3160722256177163633" class="tab-panel active">
|
| 43 |
+
<div class="task-head">
|
| 44 |
+
<div class="task-title">单帧场景图</div>
|
| 45 |
+
<div class="task-sub">images: 100 | output shape: 单帧场景图 | source tasks: 100 | models: 15</div>
|
| 46 |
+
</div>
|
| 47 |
+
|
| 48 |
+
<div class="masonry">
|
| 49 |
+
<article class="card">
|
| 50 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6358acfe0e4fef21982a929b/ukAjGbYZwG4jPRRs9UgJ0.jpeg">
|
| 51 |
+
</article>
|
| 52 |
+
<article class="card">
|
| 53 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6358acfe0e4fef21982a929b/nD1aI60oXzAuGnhBA0P8T.jpeg">
|
| 54 |
+
</article>
|
| 55 |
+
<article class="card">
|
| 56 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6358acfe0e4fef21982a929b/YveUuXuSIiBWDs-U_mYqI.jpeg">
|
| 57 |
+
</article>
|
| 58 |
+
</div>
|
| 59 |
+
</section>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
## Uses
|
| 61 |
|
| 62 |
### Installation & Download
|