scail2-dpo-lora / README.md
SceneWorks's picture
Upload README.md with huggingface_hub
d70b1b1 verified
|
Raw
History Blame Contribute Delete
2.06 kB
metadata
license: apache-2.0
base_model: zai-org/SCAIL-2
library_name: safetensors
tags:
  - lora
  - video
  - character-animation
  - scail-2
  - wan2.1
  - mlx
  - sceneworks

SCAIL-2 Bias-Aware DPO LoRA (inference-format)

A quality-refinement LoRA for zai-org/SCAIL-2 — the end-to-end controlled character-animation / cross-identity-replacement model (Wan2.1-14B I2V). This is the Bias-Aware DPO adapter zai-org ships on the sat-scail2 branch, converted from its native DeepSpeed / SwissArmyTransformer (SAT) checkpoint to an inference-named .safetensors so it loads directly into native-MLX inference engines (e.g. SceneWorks) as a standard lora_down / lora_up adapter.

  • Rank 128, 400 LoRA pairs covering every transformer block: blocks.N.{self_attn,cross_attn}.{q,k,v,o} and blocks.N.ffn.{0,2}.
  • A clean low-rank LoRA (no diff-patch tensors) — applies as a forward-time residual over the (optionally Q4 / Q8-quantized) base.
  • bf16, ~1.2 GB.

Conversion

The upstream model/bias-aware-dpo-lora.pt is a DeepSpeed checkpoint (the LoRA state lives under the top-level ["module"] key) with SAT module names and fused query_key_value / key_value projections already split into per-projection lora_layer.{idx} sub-LoRAs. The conversion is a pure key rename to the inference SCAIL2Model module names — q/k/v from query_key_value; k/v from key_value; dense → the output projection o; mlp.dense_h_to_4h / dense_4h_to_hffn.0 / ffn.2; down / uplora_down / lora_up. The dims confirm the mapping (e.g. mlp.dense_h_to_4h down[128,5120] / up[13824,128] == SCAIL-2's ffn.0 [13824,5120]).

The converter is scripts/convert_scail2_dpo_lora.py in the SceneWorks repository.

License & attribution

Apache-2.0, inherited from zai-org/SCAIL-2. All credit for the underlying model and the DPO adapter belongs to zai-org; this repository only re-hosts a format conversion of their published weights.