CoolFace
Modelpublic

NagaSaiAbhinay/Krea-2-vllm-darkbrush-LoRA

sourceHugging Faceotherupdated 2mo agoView on Hugging Face
0likes11downloads
Model Card

Krea 2 · darkbrush LoRA (vLLM-Omni compatible)

A PEFT-format repackaging of `krea/Krea-2-LoRA-darkbrush` laid out for direct loading by the vLLM-Omni diffusion LoRA manager.

The original checkpoint ships a bare darkbrush.safetensors with no adapter_config.json. vLLM-Omni's diffusion LoRA loader (via vLLM's PEFTHelper / LoRAModel.from_local_checkpoint) requires a directory containing the exact PEFT filenames adapter_model.safetensors + adapter_config.json, with rank/alpha read from the config. This repo provides exactly that; the tensors are unchanged apart from the standard base_model.model. key prefix.

  • Base model: Krea 2 (krea/Krea-2-Raw, krea/Krea-2-Turbo)
  • Modules: 264 (LoRA on img_in, time_mod_proj, text-fusion + transformer-block attention/FF projections, final_layer.linear)
  • Rank / alpha: r = 32, lora_alpha = 32 (scaling alpha / r = 1.0)

Usage with vLLM-Omni

Offline

python
from vllm_omni.entrypoints.omni import Omni
from vllm_omni.lora.request import LoRARequest
from vllm_omni.lora.utils import stable_lora_int_id
from vllm_omni.inputs.data import OmniDiffusionSamplingParams

REPO = "NagaSaiAbhinay/Krea-2-vllm-darkbrush-LoRA"
omni = Omni(model="krea/Krea-2-Turbo", lora_path=REPO)
sp = OmniDiffusionSamplingParams(height=1024, width=1024, num_inference_steps=8, guidance_scale=0.0, seed=42)
sp.lora_request = LoRARequest("darkbrush", stable_lora_int_id(REPO), REPO)
sp.lora_scale = 1.0

Online (/v1/images/generations)

bash
curl -X POST http://localhost:8091/v1/images/generations \
  -H "Content-Type: application/json" \
  -d '{"prompt":"a fox in the snow, photorealistic","size":"1024x1024",
       "seed":42,"num_inference_steps":8,"guidance_scale":0.0,
       "lora":{"name":"darkbrush","path":"NagaSaiAbhinay/Krea-2-vllm-darkbrush-LoRA","scale":1.0}}'

Derived from krea/Krea-2-LoRA-darkbrush; all credit for the trained weights to Krea.