LoboForge Lens LoRA Trainer — open-source LoRA training for Lens-Base (16GB+, ComfyUI export)

#2
by LoboForge - opened

LoboForge LensTrainer

We built an open-source LoRA trainer for microsoft/Lens-Base and wanted to share it with the Lens community.
GitHub: https://github.com/LoboForge/LoboForge-LensTrainer
Docs Space: https://huggingface.co/spaces/LoboForge/LoboForge-LensTrainer
Example LoRA: https://huggingface.co/LoboForge/lens-lora-sebastian-jessica-v2

What it does

  • Config-driven trainingpython train.py <preset.yaml> with explicit CLI flags (--dataset-path, --steps, --resolution 0 for native aspect, --resume latest, etc.)
  • Aligned with Lens — flow-match training, GPT-OSS multi-layer text features, Flux2 VAE latents; uses the official microsoft/Lens package from vendor/Lens
  • 16GB-friendly — CPU offload + disk caching for text embeddings and latents (training loop keeps mostly DiT + LoRA on GPU)
  • ComfyUI-ready export — LoRA keys remapped to diffusion_model.*
  • One-command setupbash scripts/quickstart.sh installs vendor/Lens, venv deps, HF auth, and downloads models/Lens-Base via the Hub (avoids broken git-lfs pointer downloads)

Quick start

git clone https://github.com/LoboForge/LoboForge-LensTrainer.git
cd LoboForge-LensTrainer
# Accept Lens-Base license + authenticate
export HF_TOKEN=hf_...
bash scripts/quickstart.sh
python train.py configs/train_lora_lens_base_24gb.yaml \
  --dataset-path /path/to/images_and_captions \
  --output-dir ./output/my-lora \
  --job-name my-lora \
  --model-repo ./models/Lens-Base \
  --steps 2000 \
  --resolution 0 \
  --disable-mxfp4
![step_006800_lora_standing_forward_laughing](https://cdn-uploads.huggingface.co/production/uploads/6a22fb23e6eb50681e9e6f96/3d_nFEqTsBxx2-rjfzAd6.png)
LoboForge changed discussion title from LoboForge LensTrainer — open-source LoRA training for Lens-Base (16GB+, ComfyUI export) to LoboForge Lens LoRA Trainer — open-source LoRA training for Lens-Base (16GB+, ComfyUI export)

Sign up or log in to comment