This is the final and fully‑stabilized release of the Twin‑Engine Trainer v5.7 series.
The 5.7 branch received rapid updates due to extensive internal improvements,
but v5.7.7 TrueFinal completes all bug fixes, stability patches, and structural corrections.
Text Encoder Layers → α = 16
Ensures proper gradient balance and consistent LoRA behavior.
✔ Adaptive 1D Pooling Projection
Replaces the old linear‑interpolation projection.
Prevents geometric distortion
Produces stable hidden‑dimension alignment
Fully Low‑VRAM compatible
✔ Temporal Collapse Fix
Video inputs now preserve temporal structure via frame‑wise mean pooling.
This allows FFN (Low‑Rank) layers to learn motion correctly.
✔ Dataset Frame Padding Guard
All video/image inputs are padded to a fixed frame count.
Prevents DataLoader crashes
Ensures consistent batch shapes
✔ Corrected Optimizer / Backward Placement
optimizer.step() and backward() are now inside the batch loop
Eliminates silent gradient accumulation bugs
Ensures proper training flow
✔ NaN / Inf Safety System
All layer losses are checked and skipped if invalid.
Prevents silent corruption during long training runs.
✔ FP32 Drift Accumulator
Loss accumulation is performed in FP32 to avoid FP16 underflow.
Improves long‑step stability and convergence.
📌 Recommended
Please use v5.7.7 TrueFinal for all training.
This version provides the most stable, predictable, and correct Twin‑Engine behavior.
A high-efficiency, fully-integrated LoRA training framework for Wan2.1 / Wan2.2 (1.3B, 7B, 14B) video generation models — engineered to run flawlessly on a single 12GB VRAM GPU (RTX 3060 / 4060).
Developed by Akira and AI Collaborator.
🚀 Key Features (v5.7)
12GB VRAM Breakthrough
Full-model DiT + UMT5-XXL LoRA injection under 8.7GB peak VRAM, avoiding all OOM failures.
This trainer was developed and verified on the following hardware configuration:
GPU: NVIDIA GeForce RTX 3060 (12GB VRAM)
RAM: 64GB
CPU: AMD Ryzen 5 PRO 4650G (6C/12T)
Storage: SSD recommended (for fast dataset loading)
This specification is not required, but represents a stable and efficient environment for training both High‑Engine (static) and Low‑Engine (video) LoRA models.
1# Inject UMT5-XXL Text Encoder LoRA2# (Full execution patch block code included inside the repository tree files)
🔍 Tools Included
✔ Wan LoRA Analyzer
Inspects any Wan LoRA and prints rank, alpha, and layer mapping.
✔ Text Encoder Scanner (v5.6.2 TrueFinal)
Extracts all 193 UMT5-XXL layers from .pth or .safetensors.
📄 License
MIT-like open license.
Credit Akira if you use or modify.
🙏 Acknowledgements / お礼
This trainer is shared as a personal thank-you to the open-source AI community.
If it helps your workflow or inspires new ideas, that alone makes me happy.