Darwin-Image-v1 / README.md
SeaWolf-AI's picture
Upload model
3ce9bf4
|
Raw
History Blame Contribute Delete
5.18 kB
---
license: apache-2.0
language:
- en
- ko
library_name: diffusers
pipeline_tag: text-to-image
tags:
- darwin-image
- aether-metacognitive
- z-image
- lora-merge
- korean-text
- vlm-judge
base_model:
- Tongyi-MAI/Z-Image-Turbo
- Shakker-Labs/AWPortrait-Z
- qqnyanddld/nsfw-z-image-lora
- renderartist/Technically-Color-Z-Image-Turbo
- wcde/Z-Image-Turbo-DeJPEG-Lora
inference: false
---
# Darwin-Image-v1 β€” Unified DiT + VLM
**Darwin-Image-v1** is a **physically unified** model repository that
combines two models into a single HF repo:
1. **Z-Image Turbo** (6B DiT) at the repo root, with 4 LoRAs fused into
the transformer weights (no runtime adapter loading).
2. **Darwin-4B-David** (Gemma4 multimodal VLM, ~16GB bf16) inside the
`vlm_judge/` subfolder.
Both models coexist as real safetensors files in this single repo, so a
single `from_pretrained()` call downloads everything needed for the
AETHER metacognitive image generation pipeline.
## Repo Layout
```
FINAL-Bench/Darwin-Image-v1/
β”œβ”€β”€ model_index.json # Z-Image pipeline manifest
β”œβ”€β”€ scheduler/ # Z-Image components
β”œβ”€β”€ text_encoder/ # (Qwen3)
β”œβ”€β”€ tokenizer/
β”œβ”€β”€ transformer/ # β˜… DiT with 4 LoRAs fused
β”œβ”€β”€ vae/
β”œβ”€β”€ vlm_judge/ # β˜…β˜… Darwin-4B-David
β”‚ β”œβ”€β”€ config.json # Gemma4ForConditionalGeneration
β”‚ β”œβ”€β”€ model.safetensors # ~16GB bfloat16
β”‚ β”œβ”€β”€ tokenizer.json
β”‚ β”œβ”€β”€ chat_template.jinja
β”‚ └── generation_config.json
β”œβ”€β”€ lora_manifest.yaml
β”œβ”€β”€ aether_config.json
β”œβ”€β”€ fuse_report.json
└── README.md (this file)
```
## LoRA Stack Fused Into DiT (v2, 2026-04-10)
```
Z-Image Turbo (6B DiT, bf16)
└── + Shakker-Labs/AWPortrait-Z (scale 0.7) β†’ portrait quality
└── + qqnyanddld/nsfw-z-image-lora (scale 0.5) β†’ uncensored
└── + renderartist/Technically-Color-Z-Image-Turbo (scale 0.3) β†’ color
```
All LoRAs use the ai-toolkit standard format (480 keys each,
`diffusion_model.layers.N.X.lora_A/B.weight`). Fused via direct matrix
update (`pipeline/manual_fuse.py`): `W += (B @ A) Γ— (alpha/rank) Γ— scale`.
### v2 Changelog
- **Removed** `wcde/Z-Image-Turbo-DeJPEG-Lora/dejpeg_v3` β€” caused over-smoothing
that destroyed portrait/color detail. delta_norm was 3.67 vs 0.14~0.41 for
other LoRAs (26Γ— baseline). Z-Image Turbo is distilled and has minimal
JPEG artifacts to begin with, so dejpeg was unnecessary.
- **Reduced** `Technically-Color-Z-Image-Turbo` scale 0.4 β†’ 0.3 to prevent
over-saturation on high-contrast/neon scenes.
## Usage
### DiT only (text-to-image)
```python
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained(
"FINAL-Bench/Darwin-Image-v1",
torch_dtype=torch.bfloat16,
token="hf_...",
).to("cuda")
image = pipe(
prompt="cinematic portrait of a korean woman, golden hour, 85mm f1.4",
num_inference_steps=8,
guidance_scale=3.5,
height=1024,
width=1024,
).images[0]
```
### Load the bundled VLM judge (from subfolder)
```python
from transformers import AutoModel, AutoProcessor
import torch
judge = AutoModel.from_pretrained(
"FINAL-Bench/Darwin-Image-v1",
subfolder="vlm_judge",
torch_dtype=torch.bfloat16,
device_map="cuda",
token="hf_...",
)
processor = AutoProcessor.from_pretrained(
"FINAL-Bench/Darwin-Image-v1",
subfolder="vlm_judge",
token="hf_...",
)
```
## AETHER Integration
For the full metacognitive pipeline (VLM prompt enhancement + quality
judging + Korean text inpainting), use the Darwin Image pipeline code:
```python
from darwin_image.pipeline import DarwinZImagePipeline, DarwinJudge, run_aether, AetherConfig
pipe = DarwinZImagePipeline(base_model="FINAL-Bench/Darwin-Image-v1")
judge = DarwinJudge() # loads Darwin-4B-David
result = run_aether(
user_prompt='μ˜ν™” ν¬μŠ€ν„°: "λ΄„μ˜ μ„œμšΈ" λ²šκ½ƒ λ‚¨μ‚°νƒ€μ›Œ',
pipe=pipe,
judge=judge,
config=AetherConfig(max_iter=3, threshold=8.0),
seed=42,
)
result.final_image.save("out.png")
```
## Default AETHER Config
See `aether_config.json` for the default metacognitive loop parameters:
- `max_iter`: 3 (up to 3 retries)
- `threshold`: 8.0 (overall score threshold to exit early)
- `enable_vlm_enhance`: true (VLM rewrites prompts)
- `enable_vlm_judge`: true (VLM scores each iteration)
- `enable_mti`: false (experimental, off by default on 8-step distilled models)
## License
Apache 2.0 β€” inherits from Z-Image Turbo and all LoRA base models.
## Citation
If you use Darwin-Image-v1, please cite:
```bibtex
@misc{darwin-image-2026,
title={Darwin Image: VLM-Guided Metacognitive Image Generation with Korean Text Integration},
author={VIDRAFT and μ§€λ‹ˆμ  AI and FINAL-Bench},
year={2026},
howpublished={\url{https://huggingface.co/FINAL-Bench/Darwin-Image-v1}},
}
```
## Safety Notice
This model includes an uncensored LoRA component. Use responsibly.
The AETHER pipeline Space (`darwin-image-gen`) is deployed as **private**
(FINAL-Bench org only) for this reason.