Musubi Tuner is a comprehensive LoRA training and inference toolkit for a wide range of diffusion model architectures, including HunyuanVideo, Wan, FramePack, FLUX variants, Qwen-Image, Z-Image, HiDream-O1, Ideogram4, Krea2, and Kandinsky5. It provides a unified pipeline of pre-caching (latents and text encoder outputs), training (LoRA, LoHa, LoKr), and generation, all accessible via CLI scripts and an optional Gradio GUI. The codebase is built on a shared `NetworkTrainer` base class with architecture-specific overrides, and includes advanced memory-saving techniques such as block-swap CPU offloading, FP8 quantization, and gradient checkpointing. While the repository is actively maintained and widely used (2035 stars), it exhibits medium technical drift due to vendored external model code, deprecated diffusers API usage, and a proliferation of near-duplicate architecture-specific scripts. The core reusable components—unified attention backend, offloading utilities, FP8 optimization, and LoRA network infrastructure—demonstrate solid engineering craftsmanship.
This repository is a comprehensive toolkit for analyzing, optimizing, and transforming ONNX models. It provides a core library (onnx_tool) for loading models, performing graph analysis (shape/value inference), profiling computational complexity (MACs, parameters, memory), applying optimizations (operator fusion, constant folding), quantizing weights, and managing memory for efficient inference. The toolkit supports a wide range of model architectures including LLMs (BERT, GPT, LLaMa, MPT, Qwen), diffusion models (Stable Diffusion), computer vision (ResNet, EfficientNet), and multimodal models. Key features include a custom inference engine (GraphInfer) with memory pooling for zero-copy tensor views, a plugin-based node registry system for extending ONNX operator support, and utilities for model conversion and evaluation. The architecture centers around the onnx_tool package, which defines fundamental abstractions like Graph, Tensor, and Node. The Graph class handles model loading, shape inference, and transformation pipelines. The Node registry system allows dynamic registration of operation-specific handlers for shape/value inference and profiling. Optimization modules (fusion, quantization) work on the graph representation, while the inference engine (inference/infer.py) executes optimized graphs using a memory pool to minimize allocation overhead. Additional components include benchmarking scripts for performance analysis, model configuration management, and specialized support for LLM KV-cache handling. While the core library demonstrates solid engineering with reusable patterns like the node registry and graph rewrite framework, there are areas of technical drift due to loose dependency versioning and the broad scope requiring continuous maintenance to keep pace with evolving model architectures and ONNX specifications. The project appears maintained based on recent commit activity and community engagement (stars, forks, issue templates), though dependency management without version constraints poses a risk for long-term stability.