Text-to-Image
Diffusers
Safetensors
English
Korean
ZImagePipeline
image-generation
quantized
bitsandbytes
nf4
4-bit precision
on-device
korean
pocket
vidraft
8-bit precision
Instructions to use FINAL-Bench/POCKET-Image-Zimage with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use FINAL-Bench/POCKET-Image-Zimage with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("FINAL-Bench/POCKET-Image-Zimage", torch_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
Honest card: 4-bit NF4 Z-Image build + usage + Studio link
Browse files
README.md
CHANGED
|
@@ -5,54 +5,52 @@ base_model:
|
|
| 5 |
pipeline_tag: text-to-image
|
| 6 |
library_name: diffusers
|
| 7 |
language:
|
| 8 |
-
- ko
|
| 9 |
- en
|
| 10 |
-
-
|
| 11 |
-
- ja
|
| 12 |
-
- ar
|
| 13 |
-
- th
|
| 14 |
tags:
|
| 15 |
- text-to-image
|
| 16 |
- image-generation
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
-
- typography
|
| 22 |
-
- poster
|
| 23 |
- on-device
|
|
|
|
| 24 |
- pocket
|
| 25 |
- vidraft
|
| 26 |
---
|
| 27 |
|
| 28 |
-
# πΌοΈ POCKET-Image-Zimage β
|
| 29 |
|
| 30 |
-
**
|
| 31 |
-
|
| 32 |
-
Built on the open, commercial-friendly [Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image) foundation
|
| 33 |
-
and VIDRAFT's **POCKET-Core** engine.
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
##
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
- πͺΆ **From 4.5 GB** footprint Β· π» Windows Β· macOS Β· Linux (RTX or Apple Silicon)
|
| 42 |
-
- π **Fully local** β no cloud, no account
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
##
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
| RTX 2060 (6 GB, offloaded) | **4.5 GB** |
|
| 52 |
-
| MacBook (M1 ProβM4, 16 GB+) | **13.4 GB** |
|
| 53 |
|
| 54 |
-
|
| 55 |
|
|
|
|
| 56 |
|
| 57 |
<!-- POCKET-FAMILY -->
|
| 58 |
|
|
@@ -68,7 +66,7 @@ Base model: [Tongyi-MAI/Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image) (Apa
|
|
| 68 |
- π°π· [POCKET-KR-GGUF](https://huggingface.co/FINAL-Bench/POCKET-KR-GGUF) β Korean, Android
|
| 69 |
- π [POCKET-KR-MLX](https://huggingface.co/FINAL-Bench/POCKET-KR-MLX) β Korean, iPhone / Mac
|
| 70 |
- π [POCKET-EN-GGUF](https://huggingface.co/FINAL-Bench/POCKET-EN-GGUF) β English, phone / PC
|
| 71 |
-
- πΌοΈ [POCKET-Image-Zimage](https://huggingface.co/FINAL-Bench/POCKET-Image-Zimage) β
|
| 72 |
|
| 73 |
**Demos & tools (Spaces)**
|
| 74 |
- π¨ [POCKET-Image Studio](https://huggingface.co/spaces/FINAL-Bench/POCKET-Image-Studio) β text-in-image, generate in-page
|
|
|
|
| 5 |
pipeline_tag: text-to-image
|
| 6 |
library_name: diffusers
|
| 7 |
language:
|
|
|
|
| 8 |
- en
|
| 9 |
+
- ko
|
|
|
|
|
|
|
|
|
|
| 10 |
tags:
|
| 11 |
- text-to-image
|
| 12 |
- image-generation
|
| 13 |
+
- quantized
|
| 14 |
+
- bitsandbytes
|
| 15 |
+
- nf4
|
| 16 |
+
- 4-bit
|
|
|
|
|
|
|
| 17 |
- on-device
|
| 18 |
+
- korean
|
| 19 |
- pocket
|
| 20 |
- vidraft
|
| 21 |
---
|
| 22 |
|
| 23 |
+
# πΌοΈ POCKET-Image-Zimage β 4-bit (NF4) Z-Image for on-device
|
| 24 |
|
| 25 |
+
A **4-bit (NF4) quantized build of [Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image)** (Apache-2.0),
|
| 26 |
+
packaged by VIDRAFT for **low-VRAM, on-device** image generation β part of the POCKET line.
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
- π¦ **~6 GB on disk** (transformer + text encoder in NF4, VAE in fp16)
|
| 29 |
+
- β‘ **Runs from ~8.6 GB VRAM** (β**4.5 GB** with CPU offload) β vs **23.3 GB** for bf16
|
| 30 |
+
- π― ~2.7β5Γ smaller footprint, quality on par with the bf16 base
|
| 31 |
|
| 32 |
+
## Usage
|
| 33 |
+
```python
|
| 34 |
+
import torch
|
| 35 |
+
from diffusers import ZImagePipeline # or ZImageImg2ImgPipeline / ZImageInpaintPipeline
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
pipe = ZImagePipeline.from_pretrained(
|
| 38 |
+
"FINAL-Bench/POCKET-Image-Zimage", torch_dtype=torch.bfloat16
|
| 39 |
+
).to("cuda")
|
| 40 |
+
img = pipe("a serene mountain lake at sunrise, photorealistic", num_inference_steps=20).images[0]
|
| 41 |
+
img.save("out.png")
|
| 42 |
+
```
|
| 43 |
+
Requires **`bitsandbytes`** (CUDA). Measured reload + generate peak: ~10.9 GB VRAM.
|
| 44 |
+
For Apple Silicon / CPU, an `optimum-quanto` int8 build (~13.4 GB) is the portable option.
|
| 45 |
|
| 46 |
+
## π¨ The full POCKET-Image system
|
| 47 |
+
This repo hosts the **quantized base model** only. The headline **character-perfect Korean &
|
| 48 |
+
multilingual text** feature is delivered by the POCKET-Image *pipeline*, not by these weights alone.
|
| 49 |
+
Try the full system here:
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
- **π¨ Studio (generate here):** https://huggingface.co/spaces/FINAL-Bench/POCKET-Image-Studio
|
| 52 |
|
| 53 |
+
Base model: [Tongyi-MAI/Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image) (Apache-2.0) Β· Quantization: bitsandbytes NF4 Β· By VIDRAFT.
|
| 54 |
|
| 55 |
<!-- POCKET-FAMILY -->
|
| 56 |
|
|
|
|
| 66 |
- π°π· [POCKET-KR-GGUF](https://huggingface.co/FINAL-Bench/POCKET-KR-GGUF) β Korean, Android
|
| 67 |
- π [POCKET-KR-MLX](https://huggingface.co/FINAL-Bench/POCKET-KR-MLX) β Korean, iPhone / Mac
|
| 68 |
- π [POCKET-EN-GGUF](https://huggingface.co/FINAL-Bench/POCKET-EN-GGUF) β English, phone / PC
|
| 69 |
+
- πΌοΈ [POCKET-Image-Zimage](https://huggingface.co/FINAL-Bench/POCKET-Image-Zimage) β 4-bit Z-Image (this repo)
|
| 70 |
|
| 71 |
**Demos & tools (Spaces)**
|
| 72 |
- π¨ [POCKET-Image Studio](https://huggingface.co/spaces/FINAL-Bench/POCKET-Image-Studio) β text-in-image, generate in-page
|