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
Redrob Image
Redrob Image๋ Redrob์ ์คํ์จ์ดํธ ํ์ฐ ๋ชจ๋ธ์ด๊ณ , ์ด์ฅํ (Janghoon Lee)๊ฐ ๋ง๋ค์์ต๋๋ค.
Redrob์ ๋น์ ์ AI๋ฅผ ๋ฏผ์ฃผํํ๋ ๊ฒ ๊ฐ์๋ฐ์. ์ด ๋ชจ๋ธ์ Apache License 2.0 ์๋์์ ๋ฌด๋ฃ๋ก ์ฐ๊ณ , ์์ ์ ์ผ๋ก๋ ์ธ ์ ์์ต๋๋ค.
์ ์ด ๋ชจ๋ธ์ธ๊ฐ
- ๋ฒ ์ด์ค๋ณด๋ค ํ์ค์ ์ธ ์ชฝ์ผ๋ก ๋ง์ท์ต๋๋ค. ํผ๋ถ, ๋น, ์ง๊ฐ์ด ๋ซ๊ณ , ํ๋ผ์คํฑํ AI ํผ๋ถ ํฐ๊ฐ ๋ํฉ๋๋ค.
- ์ฌ์ง, ํฌํธ๋ ์ดํธ, ๋ถ์๊ธฐ ์ด๋ฏธ์ง์์ ๊ฐํฉ๋๋ค.
- Turbo ์คํ์ผ ์ํ๋ง์ด๋ผ DiT ๊ธฐ์ค ์ฝ 8์คํ ์ ๋๋ค.
- Diffusers๋ก ๊ทธ๋ฅ Python์์ ๋๋ฆฌ๊ฑฐ๋, ComfyUI์์๋ ๋จธ์ง๋ UNET ํ๋๋ก ์๋๋ค.
- Apache-2.0: ์ฌ์ฉ, ์์ ์ด์ฉ, ์ฌ๋ฐฐํฌ ๊ฐ๋ฅํฉ๋๋ค.
ํ๊ณ
์ฝํ๋ ํ ์คํธ๋ ์ฝํฉ๋๋ค. ํ๊ธ, ๋ฐ๋ฐ๋๊ฐ๋ฆฌ, ๋น๋ผํด ์คํฌ๋ฆฝํธ ๋๋ถ๋ถ๋ ํฌํจ๋ฉ๋๋ค. ํ ์คํธ๊ฐ ์ค์ํ ํ๋ฉด์ ๋ค๋ฅธ ๊ฒฝ๋ก๋ก ๋นผ๋ ๊ฒ ๋ง๋ค๊ณ ๋ด ๋๋ค. ๊ทธ๋ํฝ, ์ธ์, ํ์ดํฌ ์ค์ฌ ์์ ๋ ์ฌ์ง/ํฌํธ๋ ์ดํธ๋ณด๋ค ์ฝํฉ๋๋ค.
Turbo ์ํ๋ง์ classifier-free guidance ์์ด ๋๋๋ค (guidance_scale=0 / ComfyUI cfg 1). ๊ทธ๋์ ๋ค๊ฑฐํฐ๋ธ ํ๋กฌํํธ๋ ๋ฌด์๋ฉ๋๋ค. ํผํ๊ณ ์ถ์ ๊ฑด ํฌ์งํฐ๋ธ ์ชฝ์ ๋ฃ์ผ์ธ์.
๋น ๋ฅธ ์์ (Diffusers / Python)
์ํฐํ๋ผ์ด์ฆยทํ๋ก๋์
๊ธฐ๋ณธ์
๋๋ค. Hugging Face ์
๋ก๋์ transformer/๊ฐ ๋ค์ด๊ฐ ์์ผ๋ฉด, ๊ทธ Diffusers transformer๋ฅผ ๋ก๋ํ๊ณ ํ
์คํธ ์ธ์ฝ๋ / VAE๋ ๋ฒ ์ด์ค ํ์ดํ๋ผ์ธ์์ ๊ฐ์ ธ์ต๋๋ค.
pip install -U torch transformers accelerate safetensors
pip install -U diffusers
import torch
from diffusers import ZImagePipeline, ZImageTransformer2DModel
transformer = ZImageTransformer2DModel.from_pretrained(
"redrob-labs/redrob-image",
subfolder="transformer",
torch_dtype=torch.bfloat16,
)
pipe = ZImagePipeline.from_pretrained(
"Tongyi-MAI/Z-Image-Turbo",
transformer=transformer,
torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
prompt = "A documentary portrait in natural window light, shallow depth of field"
image = pipe(
prompt=prompt,
height=1024,
width=1024,
num_inference_steps=9, # DiT forward 8ํ
guidance_scale=0.0, # Turbo์์ ํ์
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save("redrob-image.png")
์์ GPU๋ฉด pipe.enable_model_cpu_offload()๋ฅผ ์ฐ๋ฉด ๋ฉ๋๋ค.
๋น ๋ฅธ ์์ (ComfyUI)
| ํ์ผ | ์์น | ์ถ์ฒ |
|---|---|---|
redrob-image.safetensors |
models/diffusion_models/ |
์ด ์ ์ฅ์ |
qwen_3_4b_fp8_mixed.safetensors |
models/text_encoders/ |
Comfy-Org/z_image_turbo |
ae.safetensors |
models/vae/ |
๊ฐ์ Comfy-Org ํฉ |
UNETLoader->redrob-image.safetensorsCLIPLoader->qwen_3_4b_fp8_mixed.safetensors(type: lumina2)VAELoader->ae.safetensors- ์ํ๋ฌ: 8 steps, cfg 1,
res_multistep/sgm_uniform
์ต์ ๊ทธ๋ํ๋ workflows/redrob-image-api.json์
๋๋ค. ๋ค๊ฑฐํฐ๋ธ ์ปจ๋์
๋์ ConditioningZeroOut์ผ๋ก ๋น์๋๋ค. ๋ค๊ฑฐํฐ๋ธ ํ
์คํธ๊ฐ ์ด๋ฏธ์ง๋ฅผ ๋ฐ๊ฟ ๊ฑฐ๋ผ๊ณ ๊ธฐ๋ํ์ง ๋ง์ธ์.
ํ์ผ
| ๊ฒฝ๋ก | ์ญํ |
|---|---|
redrob-image.safetensors |
ComfyUI ๋จธ์ง UNET (LFS, ~12 GiB) |
transformer/ |
Diffusers ๋ ์ด์์ (HF ์ ๋ก๋ ์ ์์ฑ) |
workflows/redrob-image-api.json |
์ต์ ComfyUI API ๊ทธ๋ํ |
README.md / README.ko.md |
๋ชจ๋ธ ์นด๋ (์์ด / ํ๊ตญ์ด) |
LICENSE |
Apache License 2.0 |
NOTICE |
์ถ์ฒ ํ๊ธฐ |
transformer/๋ git์ ์์ต๋๋ค. Hugging Face ์
๋ก๋ ๋ scripts/push_hf.sh๊ฐ Comfy UNET์ Diffusers ํฌ๋งท์ผ๋ก ๋ณํํ๊ฑฐ๋, ๋ฏธ๋ฆฌ ๋ง๋ TRANSFORMER_DIR์ ๋ณต์ฌํฉ๋๋ค.
๋ก์ปฌ์์ Comfy UNET์ ์ง์ ๋ณํํ๋ ค๋ฉด:
python scripts/comfy_to_diffusers_zimage.py \
--input redrob-image.safetensors \
--output-dir transformer/
๋ผ์ด์ ์ค
Apache License 2.0. ์ ์๊ถ์ Redrob. ์ ์์ ์ด์ฅํ (Janghoon Lee). ์ ์คํธ๋ฆผ ํ๊ธฐ๋ NOTICE. ์ฌ๋ฐฐํฌํ ๋๋ NOTICE๋ฅผ ๊ฐ์ค์น์ ํจ๊ป ์ ์งํ์ธ์.
์ ์ / ์ถ์ฒ
- ์ ์๊ถ: Redrob (redrob.io)
- ์ ์: ์ด์ฅํ (Janghoon Lee) (@savagemanage)
- ์ ์ฅ์: redrob-labs/redrob-image
- ๋ฒ ์ด์ค: Tongyi-MAI/Z-Image-Turbo - Apache License 2.0