lora-video-hosting

Installation
SKILL.md

LoRA Video Training & Hosting — Skill

Generic pattern for synthetic video LoRAs. No explicit content. Use for wellness / character video.

1. Training

  • Base: Wan 2.2-T2V-A14B — MoE, ~27B total params (14B active). Full bf16 weights alone exceed 24GB, so a single RTX 4090 only works for LoRA training if you quantize the frozen base to fp8 and/or use block-swap/CPU offload; without that, use a 48GB+ card (A6000/L40S). Use the rented Vast GPU for training. Boat CI Boxes have no GPU.
  • LoRA type: DreamBooth-style video LoRA. Civitai types=LORA&baseModels=Wan Video 14B t2v, sort=Most Downloaded.
  • Dataset: 15–30 short clips (3–5s each), captioned. Curate via Civitai collections API (/api/v1/collections/{id}) or manual picks. Top LoRAs: Detail enhancer, FusionX, 360 rotation — all generic.
  • Train call: vast clone Wan + accelerate launch train_lora.py --base Wan-AI/Wan2.2-T2V-A14B --lora_rank 32 --learning_rate 1e-4
  • Checkpoint: Save as lora-{category}-{id}.safetensors to R2 loras/.

2. Hosting

  • GPU: RTX 4090D 24GB ($0.11 spot) or 4090 $0.30 flat. Use image vastai/pytorch:2.6.0-cuda12.1-py310 on the rented GPU.
  • Endpoint: Put the rented box behind TLS (Cloudflare Tunnel or a Caddy reverse proxy) and call https://<tunnel-host>/v1/video — the raw http://<vast-ip>:8000 port sends prompts and generated video unencrypted across the public internet. Local fallback HF_TOKEN via https://router.huggingface.co/hf-inference.
  • Secrets: Keep in .dev.vars (wrangler reads it) + mirror to a local secrets file outside the repo. Keys: HF_TOKEN, CIVITAI_API_KEY, VAST_API_KEY. Never commit.
  • Cache: Civitai LoRAs cached 5m via Workers Cache API or KV (/tmp has no durable filesystem across Worker isolates). KV FLAGS for feature gates, D1 videos table for status.
Installs
1
GitHub Stars
1
First Seen
Nov 15, 2026