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
File size: 3,099 Bytes
5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 5364f3d 5a24750 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | ---
license: apache-2.0
base_model:
- Tongyi-MAI/Z-Image
pipeline_tag: text-to-image
library_name: diffusers
language:
- en
- ko
tags:
- text-to-image
- image-generation
- quantized
- bitsandbytes
- nf4
- 4-bit
- on-device
- korean
- pocket
- vidraft
---
# πΌοΈ POCKET-Image-Zimage β 4-bit (NF4) Z-Image for on-device
A **4-bit (NF4) quantized build of [Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image)** (Apache-2.0),
packaged by VIDRAFT for **low-VRAM, on-device** image generation β part of the POCKET line.
- π¦ **~6 GB on disk** (transformer + text encoder in NF4, VAE in fp16)
- β‘ **Runs from ~8.6 GB VRAM** (β**4.5 GB** with CPU offload) β vs **23.3 GB** for bf16
- π― ~2.7β5Γ smaller footprint, quality on par with the bf16 base
## Usage
```python
import torch
from diffusers import ZImagePipeline # or ZImageImg2ImgPipeline / ZImageInpaintPipeline
pipe = ZImagePipeline.from_pretrained(
"FINAL-Bench/POCKET-Image-Zimage", torch_dtype=torch.bfloat16
).to("cuda")
img = pipe("a serene mountain lake at sunrise, photorealistic", num_inference_steps=20).images[0]
img.save("out.png")
```
Requires **`bitsandbytes`** (CUDA). Measured reload + generate peak: ~10.9 GB VRAM.
For Apple Silicon / CPU, an `optimum-quanto` int8 build (~13.4 GB) is the portable option.
## π¨ The full POCKET-Image system
This repo hosts the **quantized base model** only. The headline **character-perfect Korean &
multilingual text** feature is delivered by the POCKET-Image *pipeline*, not by these weights alone.
Try the full system here:
- **π¨ Studio (generate here):** https://huggingface.co/spaces/FINAL-Bench/POCKET-Image-Studio
Base model: [Tongyi-MAI/Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image) (Apache-2.0) Β· Quantization: bitsandbytes NF4 Β· By VIDRAFT.
<!-- POCKET-FAMILY -->
---
## π§© The POCKET Family β On-device AI by VIDRAFT
*Big models, small hardware. No GPU, no cloud.*
**Models**
- π¦ [POCKET-35B-GGUF](https://huggingface.co/FINAL-Bench/POCKET-35B-GGUF) β flagship, PC / server, no GPU
- π¦ [POCKET-26B-GGUF](https://huggingface.co/FINAL-Bench/POCKET-26B-GGUF) β compact 26B
- π°π· [POCKET-KR-GGUF](https://huggingface.co/FINAL-Bench/POCKET-KR-GGUF) β Korean, Android
- π [POCKET-KR-MLX](https://huggingface.co/FINAL-Bench/POCKET-KR-MLX) β Korean, iPhone / Mac
- π [POCKET-EN-GGUF](https://huggingface.co/FINAL-Bench/POCKET-EN-GGUF) β English, phone / PC
- πΌοΈ [POCKET-Image-Zimage](https://huggingface.co/FINAL-Bench/POCKET-Image-Zimage) β 4-bit Z-Image (this repo)
**Demos & tools (Spaces)**
- π¨ [POCKET-Image Studio](https://huggingface.co/spaces/FINAL-Bench/POCKET-Image-Studio) β text-in-image, generate in-page
- π₯οΈ [POCKET-35B-CPU](https://huggingface.co/spaces/FINAL-Bench/POCKET-35B-CPU) β 35B answering on a CPU
- π₯οΈ [POCKET-26B-CPU](https://huggingface.co/spaces/FINAL-Bench/POCKET-26B-CPU) β 26B on a CPU
π [Full POCKET collection](https://huggingface.co/collections/FINAL-Bench/pocket-models-6a618ee5d23eafb7e185a5c6)
<!-- /POCKET-FAMILY -->
|