Spaces:
Running on Zero
Running on Zero
docs: hf space frontmatter + readme
Browse files
README.md
CHANGED
|
@@ -1,3 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# z-image-studio
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Z-Image Studio
|
| 3 |
+
emoji: ⚡
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: red
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "5.50.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
python_version: "3.11"
|
| 10 |
+
suggested_hardware: zero-a10g
|
| 11 |
+
hf_oauth: false
|
| 12 |
+
preload_from_hub:
|
| 13 |
+
- Tongyi-MAI/Z-Image transformer/diffusion_pytorch_model.safetensors,text_encoder/*.safetensors,vae/diffusion_pytorch_model.safetensors,tokenizer/*
|
| 14 |
+
- Tongyi-MAI/Z-Image-Turbo transformer/diffusion_pytorch_model.safetensors
|
| 15 |
+
- PAI/Z-Image-Turbo-Fun-Controlnet-Union-2.1 Z-Image-Turbo-Fun-Controlnet-Union-2.1-8steps.safetensors
|
| 16 |
+
- xinntao/Real-ESRGAN RealESRGAN_x4plus.pth
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
# z-image-studio
|
| 20 |
|
| 21 |
+
Gradio app for [Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image) and [Z-Image-Turbo](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo) wrapping three modes under a single, focused UI:
|
| 22 |
+
|
| 23 |
+
1. **Text → Image** — pick Base (25 steps, cfg=4) or Turbo (8 steps, cfg=1)
|
| 24 |
+
2. **ControlNet** — Z-Image-Turbo-Fun-Controlnet-Union-2.1 with Canny / Depth / Pose preprocessors
|
| 25 |
+
3. **Upscale** — RealESRGAN x4 + Z-Image-Turbo img2img refinement (effective 2× with detail restoration)
|
| 26 |
+
|
| 27 |
+
Each tab supports an optional LoRA upload + strength slider. Runs on Apple Silicon (MPS) or NVIDIA (CUDA) locally, deploys to Hugging Face Spaces (ZeroGPU H200).
|
| 28 |
+
|
| 29 |
+
## Local quickstart
|
| 30 |
+
|
| 31 |
+
Requires Python 3.11 and ~35 GB free disk for model weights.
|
| 32 |
+
|
| 33 |
+
```bash
|
| 34 |
+
git clone https://github.com/<your-handle>/z-image-studio
|
| 35 |
+
cd z-image-studio
|
| 36 |
+
bash setup.sh
|
| 37 |
+
source .venv/bin/activate
|
| 38 |
+
python app.py
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
First run downloads ~30 GB into `~/.cache/huggingface/hub` (one-time). Subsequent starts are fast.
|
| 42 |
+
|
| 43 |
+
## HF Spaces deployment
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
git remote add space https://huggingface.co/spaces/<your-handle>/z-image-studio
|
| 47 |
+
git push space main
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
The Space's `preload_from_hub` directive pre-downloads the weights at build time; the `_bootstrap()` in `app.py` mirrors them into a writable tree at runtime.
|
| 51 |
+
|
| 52 |
+
## License
|
| 53 |
+
|
| 54 |
+
MIT for the app code. DiffSynth-Studio (Apache-2.0), Z-Image, and RealESRGAN retain their respective licenses.
|