AI Fine-tuning trains custom models from your Drupal content. Pick a provider, point a job at uploaded images, a content type, or a View, and the module builds the dataset, starts the remote training, polls it on cron and stores the resulting model or style id. It ships the workflow and a plugin type; provider modules ship the plugin that talks to their API.
Features
- Train LoRAs and styles from images, or fine-tune language models from text entities.
- Fine-tuning jobs are content entities managed at
/admin/config/ai/finetune: add, start, refresh, cancel, train again. - Three dataset sources, described below. The job form reports the dataset size on save so you see what will be sent before you spend credits.
- An
ai_finetunerview mode for nodes and media, so each bundle decides which fields count as training material. - A Views display type and style plugin that map a view's rows to title, text and images, with a preview table in the Views UI.
- Cron polls every active job until the provider reports a result, a failure or a cancellation.
- Drush commands for the whole lifecycle:
ai-finetuner:providers,list,create,dataset,start,status,cancel,delete, with--waitpolling. - Provider plugins declare their base models, training types, minimum dataset size and settings form; the UI adapts to whatever the plugin offers.
Uploaded images
Attach 5 to 30 images to the job. The simplest way to train a style or character LoRA.
Entities and view modes
Every entity of a bundle (or a list of ids) rendered through a view mode. Image datasets collect the visible image, file and media fields; text datasets use the rendered output as plain text.
Views
A view with an AI fine-tuning dataset display. Filters, sorts and relationships apply; the style plugin maps fields to title, text and image.
A training run sends the selected content to the provider and spends provider credits. The administer ai finetuning permission covers every operation; grant it to trusted roles only.
Installation
- Install the module with Composer and enable it:
composer require drupal/ai_finetuner, thendrush en ai_finetuner. - Enable a provider module that ships a fine-tuning plugin and configure its API key.
- Go to Configuration > AI > AI Infrastructure > Fine-tuning, add a job, choose the provider and the dataset, save, then use Start training.
- Wait for cron or use Refresh status. When the job completes, Edit shows the result id and the plugin's usage instructions.
Documentation
Setup, dataset sources, Drush commands and a guide to writing a provider plugin are covered in the full documentation.
For developers
A provider adds training support with one class in src/Plugin/AiFinetune/ carrying the #[AiFinetune] attribute. It implements isUsable(), getBaseModels(), startTraining(), checkStatus() and optionally cancelTraining(), a settings form and usage instructions. The module hands it a ready FinetuneDataset (images as ImageFile objects, or text records with a JSONL export) and stores the FinetuneStatus it returns. A test module with a fake plugin is included for kernel tests.
Requirements/Dependencies
- AI (Artificial Intelligence) module.
- At least one provider module that ships an
AiFinetuneplugin. The Krea provider (ai_provider_krea) shipskrea_lorafor training Krea styles on Flux, Krea 2, Qwen, Z Image and Wan.
AI disclosure
All code in this module was written with AI coding assistants under human supervision. The maintainer reviewed and tested every change before committing it and is responsible for the result.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the AI ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.x-dev | Dev | 10–11 | Sep 16, 2026 |