# ostris/ai-toolkit

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ostris-ai-toolkit).**

9,509 stars · 1,130 forks · Python · mit

## Links

- GitHub: https://github.com/ostris/ai-toolkit
- awesome-repositories: https://awesome-repositories.com/repository/ostris-ai-toolkit.md

## Description

ai-toolkit is a diffusion model training toolkit designed for fine-tuning image and video generation models. It functions as a containerized model trainer and GPU training job manager, providing the infrastructure to orchestrate dependencies and manage training processes on remote GPU hardware.

The system utilizes low-rank adaptation techniques, including LoRA and LoKr weight optimization, to reduce the hardware requirements for model training. It distinguishes itself through a web-based training controller that allows for the monitoring and modification of hyperparameters, secured by token-based authentication.

The toolkit includes a dataset preparation pipeline that automates image resizing, aspect-ratio bucketing, and the organization of image-text pairs. It also features a multimodal captioning tool that uses vision-language models to automatically generate descriptive text for training datasets.

General model fine-tuning is supported through layer-specific training and pattern-based layer filtering to control which weight groups are updated.

## Tags

### Artificial Intelligence & ML

- [Custom Diffusion Model Training](https://awesome-repositories.com/f/artificial-intelligence-ml/custom-diffusion-model-training.md) — Offers a comprehensive toolkit for fine-tuning image and video diffusion models using custom datasets.
- [Low-Rank Adaptation](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning/low-rank-adaptation.md) — Optimizes model training using low-rank adaptation (LoRA) to reduce hardware requirements by updating small weight matrices.
- [Diffusion Weight Optimizers](https://awesome-repositories.com/f/artificial-intelligence-ml/generative-ai-resources/diffusion-visual-models/generative-ai-models/diffusion-weight-optimizers.md) — Optimizes weights for image, video, and audio diffusion models to reduce hardware requirements for training. ([source](https://github.com/ostris/ai-toolkit#readme))
- [Generative Model Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/generative-model-fine-tuning.md) — Fine-tunes image and video diffusion models using custom datasets to achieve specific styles or subjects.
- [Multimodal Model Trainers](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-trainers/multimodal-training-interfaces/multimodal-model-trainers.md) — Functions as a multimodal trainer that orchestrates GPU access and dependencies for fine-tuning generative models.
- [LoRA Training](https://awesome-repositories.com/f/artificial-intelligence-ml/lora-training.md) — Implements LoRA and LyCORIS techniques to efficiently customize models without full parameter retraining.
- [Model Fine-Tuning](https://awesome-repositories.com/f/artificial-intelligence-ml/model-fine-tuning.md) — Implements specialized techniques to adapt pre-trained models to specific target datasets. ([source](https://github.com/ostris/ai-toolkit/blob/main/README.md))
- [Aspect Ratio Bucketing](https://awesome-repositories.com/f/artificial-intelligence-ml/aspect-ratio-bucketing.md) — Implements aspect ratio bucketing to minimize padding and preserve image compositions during generative AI training.
- [Dataset Preparation Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/dataset-preparation-tools.md) — Automates captioning, resizing, and organization of images to curate high-quality machine learning datasets.
- [Image Description Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/image-description-generation.md) — Utilizes vision-language models to automatically generate descriptive text captions for image training datasets.
- [Kronecker Product Optimizations](https://awesome-repositories.com/f/artificial-intelligence-ml/machine-learning/infrastructure/model-training-and-tuning/fine-tuning-and-customization/model-fine-tuning/low-rank-adaptation/kronecker-product-optimizations.md) — Optimizes model weights using the LyCORIS network type through low-rank Kronecker product configurations. ([source](https://github.com/ostris/ai-toolkit#readme))
- [Layer-Specific Training](https://awesome-repositories.com/f/artificial-intelligence-ml/model-training/layer-specific-training.md) — Allows restricting training to specific weight groups or excluding layers by filtering for naming patterns. ([source](https://github.com/ostris/ai-toolkit#readme))

### Data & Databases

- [Image-Text Pair Pipelines](https://awesome-repositories.com/f/data-databases/dataset-preparation-tools/image-text-pair-pipelines.md) — Provides an automated pipeline for organizing image-text pairs with resizing and aspect-ratio bucketing for model training.
- [Caption Dataset Utilities](https://awesome-repositories.com/f/data-databases/caption-dataset-utilities.md) — Uses structured JSON files to map image paths to captions, decoupling raw assets from training labels.
- [Dataset Preparation Tools](https://awesome-repositories.com/f/data-databases/dataset-preparation-tools.md) — Automates image resizing, aspect ratio bucketing, and folder organization to prepare training datasets. ([source](https://github.com/ostris/ai-toolkit#readme))

### Development Tools & Productivity

- [Training Management Dashboards](https://awesome-repositories.com/f/development-tools-productivity/developer-utilities-libraries/developer-tools/developer-interfaces/training-management-dashboards.md) — Provides a management dashboard to monitor and control AI model training experiments.

### DevOps & Infrastructure

- [Cloud Infrastructure Deployment](https://awesome-repositories.com/f/devops-infrastructure/cloud-infrastructure-deployment.md) — Supports deploying training workloads to remote GPU infrastructure using containerized environments. ([source](https://github.com/ostris/ai-toolkit/blob/main/run_modal.py))
- [GPU Training Clusters](https://awesome-repositories.com/f/devops-infrastructure/cloud-infrastructure-management/gpu-training-clusters.md) — Manages cloud GPU resources and container orchestration for high-memory AI training workloads.
- [Training Job Orchestrators](https://awesome-repositories.com/f/devops-infrastructure/cloud-infrastructure-management/gpu-training-clusters/training-job-orchestrators.md) — Ships a dashboard and command-line interface to monitor and control training processes on remote GPU infrastructure.
- [Container Environment Orchestrators](https://awesome-repositories.com/f/devops-infrastructure/container-environment-orchestrators.md) — Provides isolated container environments to manage GPU dependencies and persistent storage for training workloads.
- [Containerized Deployment Orchestration](https://awesome-repositories.com/f/devops-infrastructure/containerized-deployment-orchestration.md) — Orchestrates training environments via container definitions to manage GPU access and persistent storage. ([source](https://github.com/ostris/ai-toolkit/blob/main/docker-compose.yml))
- [Job Scheduling](https://awesome-repositories.com/f/devops-infrastructure/job-scheduling.md) — Offers a command-line interface and dashboard to control and monitor AI model training jobs. ([source](https://github.com/ostris/ai-toolkit#readme))

### User Interface & Experience

- [Web-Based Control Panels](https://awesome-repositories.com/f/user-interface-experience/web-based-control-panels.md) — Provides a web-based control panel to monitor training progress and modify hyperparameters in real-time.

### Part of an Awesome List

- [Image Captioning](https://awesome-repositories.com/f/awesome-lists/ai/image-captioning.md) — Automatically generates descriptive text for images using multimodal models to create training pairs. ([source](https://github.com/ostris/ai-toolkit/blob/main/flux_train_ui.py))

### Content Management & Publishing

- [Multimodal Captioning Tools](https://awesome-repositories.com/f/content-management-publishing/documentation-knowledge-management/captioned-figure-managers/ai-generated-captions/multimodal-captioning-tools.md) — Includes a multimodal captioning tool that uses vision-language models to generate descriptive text for training datasets.
