SuperAPIAI Directory

musubi-tuner

github.com · AI video

musubi-tuner is an open-source script repository maintained by developer kohya-ss, used to train LoRA (Low-Rank Adaptation) models on a variety of video and image generation architectures. The repository provides tools such as dataset configuration, cache precomputation, training, and inference in the form of scripts. The supported architectures include HunyuanVideo, Wan2.1/2.2, FramePack, FLUX.1 Kontext, FLUX.2 dev/klein, Qwen-Image, Z-Image, and MiniMax-H3, among others. According to official materials, this repository is an unofficial project and has no affiliation with the official repositories of the aforementioned architectures, and the project is under development and may introduce breaking changes. Installation methods are divided into two categories: pip-based and uv-based, with different instructions provided for Linux/MacOS, Windows, and Windows on ARM64. The project has enabled GitHub Discussions for community Q&A and technical exchange, and Issues for bug reports and feature requests.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

Purpose

musubi-tuner is an open-source collection of scripts for training LoRA (Low-Rank Adaptation) models for a variety of video and image generation architectures. These scripts cover architectures such as HunyuanVideo, Wan2.1/2.2, FramePack, FLUX.1 Kontext, FLUX.2 dev/klein, Qwen-Image, Z-Image, and MiniMax-H3. According to the materials, this repository is an unofficial project and has no affiliation with the official repositories of these architectures; the repository is under continuous development.

Main capabilities

  • Train LoRA models for the aforementioned architectures.
  • Dataset configuration: supports metadata JSONL files, with several adjustments made to their behavior, for example, when a relative path in the JSONL cannot be found under the working directory, it will be resolved relative to the directory where the JSONL file is located.
  • Caching and precomputation: provides latent caching scripts and text encoder output caching, allowing pre-caching before training.
  • Training and inference: includes training scripts and inference-related configurations, and provides Accelerate configuration instructions.
  • Quantization and VRAM optimization: for example, Krea 2 LoRA training provides a ConvRot int8 quantization option (--convrot_int8) as an alternative to --fp8_base --fp8_scaled, which can halve weight VRAM usage. The main advantage is improved speed on GPUs that do not support fp8 (RTX 30 series and earlier), and it uses triton to implement fused kernels.
  • Gradient diagnostics: provides the --log_grad_metrics option, which logs gradient norm diagnostic information (grad/norm, grad/mean_norm, grad/max, measured before gradient clipping) to the tracker. It is disabled by default and can be used to diagnose exploding or vanishing gradients.
  • Experimental support for MiniMax-H3: includes LoRA training and joint video/audio generation, and aligns audio embedded in video to the first video frame, fixing timestamp jitter and gaps; previously generated caches may have audio misalignment issues and require rerunning latent caching.
  • Windows on ARM64 support: newly added support (for example, NVIDIA RTX Spark PC), opencv-python becomes optional and is automatically skipped on this platform,av and safetensors are updated to versions with Windows ARM64 wheels.

Usage

According to the official information, the installation paths provided include: pip-based installation, Windows on ARM64 installation, and uv-based installation, with instructions provided separately for Linux/MacOS and Windows. The usage workflow roughly includes: dataset configuration, pre-caching and training, Accelerate configuration, training, and inference. In addition, it also includes miscellaneous content such as SageAttention installation and PyTorch version notes. To update the environment, the information recommends rerunning pip install -e .

Applicable scenarios

It is suitable for users and developers who need to train LoRA themselves for the above video/image generation architectures, as well as for training scenarios seeking quantization optimization solutions on GPUs with lower VRAM or without fp8 support. It is also suitable for experimental use cases requiring joint video and audio generation (MiniMax-H3).

Limitations

According to the information, this repository is an unofficial project and is under development, so breaking changes may occur; it is recommended to use releases as a stable reference point. Some features are explicitly marked as experimental support (such as MiniMax-H3). Regarding pricing, prices, platform compatibility, the complete list, specific results, and more usage steps, the information does not provide them completely, and no confirmable information is currently available.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools