Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Entity Usage 5.0.0 Major update available for module entity_usage (5.0.0). Release: Entity Usage 8.x-2.3 Minor update available for module entity_usage (8.x-2.3). Release: Modeler API 1.1.7 Minor update available for module modeler_api (1.1.7). Release: Excel Serialization 2.2.0 Minor update available for module xls_serialization (2.2.0). Release: Custom Field 4.0.12 Minor update available for module custom_field (4.0.12). Release: Custom Field 5.0.3 Minor update available for module custom_field (5.0.3). Release: GraphQL Compose 2.4.2 Minor update available for module graphql_compose (2.4.2). Release: Freja eID for Drupal 1.0.1 Minor update available for module freja_eid (1.0.1). Module Revived: Two-factor Authentication (TFA) 8.x-1.13 Module tfa updated after 10 months of inactivity (8.x-1.13). Usage Milestone: Easy Email Module easy_email crossed 10,000 active installs.

AI Finetuner

No security coverage

Part of the AI ecosystem · 303 projects

View on drupal.org

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_finetuner view 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 --wait polling.
  • 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

  1. Install the module with Composer and enable it: composer require drupal/ai_finetuner, then drush en ai_finetuner.
  2. Enable a provider module that ships a fine-tuning plugin and configure its API key.
  3. Go to Configuration > AI > AI Infrastructure > Fine-tuning, add a job, choose the provider and the dataset, save, then use Start training.
  4. 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.

Read the 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 AiFinetune plugin. The Krea provider (ai_provider_krea) ships krea_lora for 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.

Activity

Tracked releases
1
Tracked since
Sep 2026
Latest release
4 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.x-dev Dev 10–11 Sep 16, 2026