Instructions to use redrob-labs/redrob-image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use redrob-labs/redrob-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("redrob-labs/redrob-image", 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
Upload README.ko.md with huggingface_hub
Browse files- README.ko.md +108 -0
README.ko.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Redrob Image
|
| 2 |
+
|
| 3 |
+
[English](./README.md)
|
| 4 |
+
|
| 5 |
+
**Redrob Image**๋ [Redrob](https://redrob.io)์ ์คํ์จ์ดํธ ํ์ฐ ๋ชจ๋ธ์ด๊ณ , [์ด์ฅํ (Janghoon Lee)](https://www.janghoonlee.com)๊ฐ ๋ง๋ค์์ต๋๋ค.
|
| 6 |
+
|
| 7 |
+
Redrob์ ๋น์ ์ AI๋ฅผ ๋ฏผ์ฃผํํ๋ ๊ฒ ๊ฐ์๋ฐ์. ์ด ๋ชจ๋ธ์ [Apache License 2.0](./LICENSE) ์๋์์ ๋ฌด๋ฃ๋ก ์ฐ๊ณ , ์์
์ ์ผ๋ก๋ ์ธ ์ ์์ต๋๋ค.
|
| 8 |
+
|
| 9 |
+
## ์ ์ด ๋ชจ๋ธ์ธ๊ฐ
|
| 10 |
+
|
| 11 |
+
- ๋ฒ ์ด์ค๋ณด๋ค ํ์ค์ ์ธ ์ชฝ์ผ๋ก ๋ง์ท์ต๋๋ค. ํผ๋ถ, ๋น, ์ง๊ฐ์ด ๋ซ๊ณ , ํ๋ผ์คํฑํ AI ํผ๋ถ ํฐ๊ฐ ๋ํฉ๋๋ค.
|
| 12 |
+
- ์ฌ์ง, ํฌํธ๋ ์ดํธ, ๋ถ์๊ธฐ ์ด๋ฏธ์ง์์ ๊ฐํฉ๋๋ค.
|
| 13 |
+
- Turbo ์คํ์ผ ์ํ๋ง์ด๋ผ DiT ๊ธฐ์ค ์ฝ 8์คํ
์
๋๋ค.
|
| 14 |
+
- Diffusers๋ก ๊ทธ๋ฅ Python์์ ๋๋ฆฌ๊ฑฐ๋, ComfyUI์์๋ ๋จธ์ง๋ UNET ํ๋๋ก ์๋๋ค.
|
| 15 |
+
- Apache-2.0: ์ฌ์ฉ, ์์
์ด์ฉ, ์ฌ๋ฐฐํฌ ๊ฐ๋ฅํฉ๋๋ค.
|
| 16 |
+
|
| 17 |
+
## ํ๊ณ
|
| 18 |
+
|
| 19 |
+
์ฝํ๋ ํ
์คํธ๋ ์ฝํฉ๋๋ค. ํ๊ธ, ๋ฐ๋ฐ๋๊ฐ๋ฆฌ, ๋น๋ผํด ์คํฌ๋ฆฝํธ ๋๋ถ๋ถ๋ ํฌํจ๋ฉ๋๋ค. ํ
์คํธ๊ฐ ์ค์ํ ํ๋ฉด์ ๋ค๋ฅธ ๊ฒฝ๋ก๋ก ๋นผ๋ ๊ฒ ๋ง๋ค๊ณ ๋ด
๋๋ค. ๊ทธ๋ํฝ, ์ธ์, ํ์ดํฌ ์ค์ฌ ์์
๋ ์ฌ์ง/ํฌํธ๋ ์ดํธ๋ณด๋ค ์ฝํฉ๋๋ค.
|
| 20 |
+
|
| 21 |
+
Turbo ์ํ๋ง์ classifier-free guidance ์์ด ๋๋๋ค (`guidance_scale=0` / ComfyUI `cfg 1`). ๊ทธ๋์ **๋ค๊ฑฐํฐ๋ธ ํ๋กฌํํธ๋ ๋ฌด์๋ฉ๋๋ค**. ํผํ๊ณ ์ถ์ ๊ฑด ํฌ์งํฐ๋ธ ์ชฝ์ ๋ฃ์ผ์ธ์.
|
| 22 |
+
|
| 23 |
+
## ๋น ๋ฅธ ์์ (Diffusers / Python)
|
| 24 |
+
|
| 25 |
+
์ํฐํ๋ผ์ด์ฆยทํ๋ก๋์
๊ธฐ๋ณธ์
๋๋ค. Hugging Face ์
๋ก๋์ `transformer/`๊ฐ ๋ค์ด๊ฐ ์์ผ๋ฉด, ๊ทธ Diffusers transformer๋ฅผ ๋ก๋ํ๊ณ ํ
์คํธ ์ธ์ฝ๋ / VAE๋ ๋ฒ ์ด์ค ํ์ดํ๋ผ์ธ์์ ๊ฐ์ ธ์ต๋๋ค.
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
pip install -U torch transformers accelerate safetensors
|
| 29 |
+
pip install -U diffusers
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
```python
|
| 33 |
+
import torch
|
| 34 |
+
from diffusers import ZImagePipeline, ZImageTransformer2DModel
|
| 35 |
+
|
| 36 |
+
transformer = ZImageTransformer2DModel.from_pretrained(
|
| 37 |
+
"redrob-labs/redrob-image",
|
| 38 |
+
subfolder="transformer",
|
| 39 |
+
torch_dtype=torch.bfloat16,
|
| 40 |
+
)
|
| 41 |
+
|
| 42 |
+
pipe = ZImagePipeline.from_pretrained(
|
| 43 |
+
"Tongyi-MAI/Z-Image-Turbo",
|
| 44 |
+
transformer=transformer,
|
| 45 |
+
torch_dtype=torch.bfloat16,
|
| 46 |
+
)
|
| 47 |
+
pipe.to("cuda")
|
| 48 |
+
|
| 49 |
+
prompt = "A documentary portrait in natural window light, shallow depth of field"
|
| 50 |
+
image = pipe(
|
| 51 |
+
prompt=prompt,
|
| 52 |
+
height=1024,
|
| 53 |
+
width=1024,
|
| 54 |
+
num_inference_steps=9, # DiT forward 8ํ
|
| 55 |
+
guidance_scale=0.0, # Turbo์์ ํ์
|
| 56 |
+
generator=torch.Generator("cuda").manual_seed(42),
|
| 57 |
+
).images[0]
|
| 58 |
+
image.save("redrob-image.png")
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
์์ GPU๋ฉด `pipe.enable_model_cpu_offload()`๋ฅผ ์ฐ๋ฉด ๋ฉ๋๋ค.
|
| 62 |
+
|
| 63 |
+
## ๋น ๋ฅธ ์์ (ComfyUI)
|
| 64 |
+
|
| 65 |
+
| ํ์ผ | ์์น | ์ถ์ฒ |
|
| 66 |
+
| --------------------------------- | -------------------------- | ------------------------------------------------------------------------- |
|
| 67 |
+
| `redrob-image.safetensors` | `models/diffusion_models/` | ์ด ์ ์ฅ์ |
|
| 68 |
+
| `qwen_3_4b_fp8_mixed.safetensors` | `models/text_encoders/` | [Comfy-Org/z_image_turbo](https://huggingface.co/Comfy-Org/z_image_turbo) |
|
| 69 |
+
| `ae.safetensors` | `models/vae/` | ๊ฐ์ Comfy-Org ํฉ |
|
| 70 |
+
|
| 71 |
+
1. `UNETLoader` -> `redrob-image.safetensors`
|
| 72 |
+
2. `CLIPLoader` -> `qwen_3_4b_fp8_mixed.safetensors` (`type: lumina2`)
|
| 73 |
+
3. `VAELoader` -> `ae.safetensors`
|
| 74 |
+
4. ์ํ๋ฌ: **8 steps**, **cfg 1**, `res_multistep` / `sgm_uniform`
|
| 75 |
+
|
| 76 |
+
์ต์ ๊ทธ๋ํ๋ `workflows/redrob-image-api.json`์
๋๋ค. ๋ค๊ฑฐํฐ๋ธ ์ปจ๋์
๋์ `ConditioningZeroOut`์ผ๋ก ๋น์๋๋ค. ๋ค๊ฑฐํฐ๋ธ ํ
์คํธ๊ฐ ์ด๋ฏธ์ง๋ฅผ ๋ฐ๊ฟ ๊ฑฐ๋ผ๊ณ ๊ธฐ๋ํ์ง ๋ง์ธ์.
|
| 77 |
+
|
| 78 |
+
## ํ์ผ
|
| 79 |
+
|
| 80 |
+
| ๊ฒฝ๋ก | ์ญํ |
|
| 81 |
+
| --------------------------------- | ------------------------------------- |
|
| 82 |
+
| `redrob-image.safetensors` | ComfyUI ๋จธ์ง UNET (LFS, ~12 GiB) |
|
| 83 |
+
| `transformer/` | Diffusers ๋ ์ด์์ (HF ์
๋ก๋ ์ ์์ฑ) |
|
| 84 |
+
| `workflows/redrob-image-api.json` | ์ต์ ComfyUI API ๊ทธ๋ํ |
|
| 85 |
+
| `README.md` / `README.ko.md` | ๋ชจ๋ธ ์นด๋ (์์ด / ํ๊ตญ์ด) |
|
| 86 |
+
| `LICENSE` | Apache License 2.0 |
|
| 87 |
+
| `NOTICE` | ์ถ์ฒ ํ๊ธฐ |
|
| 88 |
+
|
| 89 |
+
`transformer/`๋ git์ ์์ต๋๋ค. Hugging Face ์
๋ก๋ ๋ `scripts/push_hf.sh`๊ฐ Comfy UNET์ Diffusers ํฌ๋งท์ผ๋ก ๋ณํํ๊ฑฐ๋, ๋ฏธ๋ฆฌ ๋ง๋ `TRANSFORMER_DIR`์ ๋ณต์ฌํฉ๋๋ค.
|
| 90 |
+
|
| 91 |
+
๋ก์ปฌ์์ Comfy UNET์ ์ง์ ๋ณํํ๋ ค๋ฉด:
|
| 92 |
+
|
| 93 |
+
```bash
|
| 94 |
+
python scripts/comfy_to_diffusers_zimage.py \
|
| 95 |
+
--input redrob-image.safetensors \
|
| 96 |
+
--output-dir transformer/
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
## ๋ผ์ด์ ์ค
|
| 100 |
+
|
| 101 |
+
[Apache License 2.0](./LICENSE). ์ ์๊ถ์ [Redrob](https://redrob.io). ์ ์์ [์ด์ฅํ (Janghoon Lee)](https://www.janghoonlee.com). ์
์คํธ๋ฆผ ํ๊ธฐ๋ [NOTICE](./NOTICE). ์ฌ๋ฐฐํฌํ ๋๏ฟฝ๏ฟฝ NOTICE๋ฅผ ๊ฐ์ค์น์ ํจ๊ป ์ ์งํ์ธ์.
|
| 102 |
+
|
| 103 |
+
## ์ ์ / ์ถ์ฒ
|
| 104 |
+
|
| 105 |
+
- **์ ์๊ถ:** Redrob ([redrob.io](https://redrob.io))
|
| 106 |
+
- **์ ์:** [์ด์ฅํ (Janghoon Lee)](https://www.janghoonlee.com) ([@savagemanage](https://github.com/savagemanage))
|
| 107 |
+
- **์ ์ฅ์:** [redrob-labs/redrob-image](https://huggingface.co/redrob-labs/redrob-image)
|
| 108 |
+
- **๋ฒ ์ด์ค:** [Tongyi-MAI/Z-Image-Turbo](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo) - Apache License 2.0
|