SeaWolf-AI commited on
Commit
5364f3d
Β·
verified Β·
1 Parent(s): 910743a

Honest card: 4-bit NF4 Z-Image build + usage + Studio link

Browse files
Files changed (1) hide show
  1. README.md +31 -33
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
- - zh
11
- - ja
12
- - ar
13
- - th
14
  tags:
15
  - text-to-image
16
  - image-generation
17
- - korean
18
- - multilingual
19
- - hangul
20
- - korean-text-rendering
21
- - typography
22
- - poster
23
  - on-device
 
24
  - pocket
25
  - vidraft
26
  ---
27
 
28
- # πŸ–ΌοΈ POCKET-Image-Zimage β€” Character-Perfect Text in Any Image
29
 
30
- **POCKET-Image** is VIDRAFT's on-device text-in-image system. It places **character-perfect text in
31
- any language** β€” Korean Β· δΈ­ζ–‡ Β· ζ—₯本θͺž Β· Ψ§Ω„ΨΉΨ±Ψ¨ΩŠΨ© Β· ΰΉ„ΰΈ—ΰΈ’ Β· Latin and more β€” onto any scene you describe.
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
- > Where global models smear non-Latin scripts ("μ•ˆλ…•ν•˜μ„Έμš”" β†’ "μ•ˆγ…κΈ°"), POCKET-Image renders every glyph exactly.
 
 
36
 
37
- ## ✨ Highlights
38
- - βœ… **100% accurate text**, any language β€” RTL (Arabic) and complex shaping (Thai, Indic) handled
39
- - πŸ–ΌοΈ **Any background** from a prompt β€” text is optional (empty β‡’ pure image)
40
- - ⚑ **No GPU, no NPU** β€” runs on plain CPU + RAM
41
- - πŸͺΆ **From 4.5 GB** footprint Β· πŸ’» Windows Β· macOS Β· Linux (RTX or Apple Silicon)
42
- - πŸ”’ **Fully local** β€” no cloud, no account
43
 
44
- ## 🎨 Try it
45
- - **Studio (generate here):** https://huggingface.co/spaces/FINAL-Bench/POCKET-Image-Studio
 
 
 
 
 
 
46
 
47
- ## πŸ’» On-device footprint (measured)
48
- | Machine | Peak memory |
49
- |---|---|
50
- | RTX 3050 / 4060 | **8.6 GB** |
51
- | RTX 2060 (6 GB, offloaded) | **4.5 GB** |
52
- | MacBook (M1 Pro–M4, 16 GB+) | **13.4 GB** |
53
 
54
- Base model: [Tongyi-MAI/Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image) (Apache-2.0). Engine: VIDRAFT POCKET-Core.
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) β€” character-perfect text in any image
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