Krea-2-controlnet
Collection
2 items β’ Updated
Depth-conditioned generation for Krea-2. Give it any image and a prompt β it extracts the depth map with Depth-Anything-V2 and generates a new image with the same 3D structure and composition, but whatever content and style you ask for.
Each strip: init image β extracted depth β generated output.
| file | base trained on | size |
|---|---|---|
depth-control-lora.safetensors |
krea/Krea-2-Raw | 862MB |
For comfy ui you follow the guide given here : https://github.com/facok/comfyui-krea2-controlnet
git clone https://github.com/Tanmaypatil123/Krea-2-controlnet.git
cd Krea-2-controlnet
pip install -r requirements.txt
hf download Patil/Krea-2-depth-controlnet depth-control-lora.safetensors --local-dir .
# Turbo base β fast, recommended (8 steps, no CFG)
python inference.py photo.jpg -p "a futuristic spaceship interior, cinematic lighting" \
--lora depth-control-lora.safetensors
# Raw base β undistilled (28-52 steps, CFG 3.5)
python inference.py photo.jpg -p "..." --lora depth-control-lora.safetensors \
--base raw
# No prompt: the depth map is the only signal
python inference.py photo.jpg --lora depth-control-lora.safetensors --save-strip
# Weaker structure adherence (more creative freedom)
python inference.py photo.jpg -p "..." --lora depth-control-lora.safetensors --lora-scale 0.6
| flag | default | notes |
|---|---|---|
-p / --prompt |
"" |
empty = depth-only generation |
--base |
turbo |
turbo or raw |
--steps |
8 turbo / 28 raw | |
--cfg |
0 turbo / 3.5 raw | classifier-free guidance |
--mu |
1.15 turbo / auto raw | timestep shift |
--lora-scale |
1.0 | control-strength dial |
--seed |
0 | |
--save-strip |
off | also saves input|depth|output comparison |
from PIL import Image
from huggingface_hub import hf_hub_download
from pipeline import DepthLoRAPipeline
base = hf_hub_download("krea/Krea-2-Turbo", "turbo.safetensors")
pipe = DepthLoRAPipeline(base, "depth-control-lora.safetensors")
out, depth = pipe(Image.open("photo.jpg"),
prompt="a cozy cabin interior at dusk",
steps=8, cfg=0.0, mu=1.15, seed=0)
out.save("output.png")
--lora-scale below 1.0 relaxes structure adherence; above 1.0 tightens it at some quality cost.inference.py β CLIpipeline.py β full pipeline: LoRA surgery, Qwen3-VL conditioner, VAE, depth estimator, flow sampler with control injectionmmdit.py β unmodified DiT definition from the krea-2 repoModel weights are subject to the Krea 2 community license. Training code will be released separately.
Base model
krea/Krea-2-Raw