Skip to main content

Overview

This schema is used for fine-tuning models with image editing capabilities.

Schema Type

When creating a fine-tune with this schema, use:
Key Parameters:
  • script_type: image_editing (the fine-tune type)
  • base_model: One of the supported model canonical names below

Supported Models

  • Qwen Image Edit (Qwen/Qwen-Image-Edit)
  • FLUX.1-Kontext [dev] (black-forest-labs/FLUX.1-Kontext-dev)

Request Schema

Required Fields

Example Request

Field Details

batch_size

Batch Size Type: integer Default: 1 Minimum: 1

cache_text_embeddings

Cache Text Embeddings Type: boolean Default: false

caption_column

Caption Column (prompt) Type: string Default: ""

control_image_column

Control Image Column (input) Type: string Default: ""

gradient_accumulation

Gradient Accumulation Type: integer Default: 1 Minimum: 1

image_column

Target Image Column (output) Type: string Default: ""

learning_rate

Learning Rate Type: number Default: 0.0002

lora_alpha

LoRA Alpha Type: integer Default: 16 Minimum: 1

lora_rank

LoRA Rank Type: integer Default: 16 Minimum: 1

sample_every

Sample Every Type: integer How often to generate samples during training (n steps) Default: 200 Minimum: 1

sample_height

Sample Height Type: integer Default: 1024 Minimum: 1

sample_width

Sample Width Type: integer Default: 1024 Minimum: 1

samples

Samples Type: array Used to show progress during the fine-tuning process Default: [{"ctrl_img_url": "https://hub.oxen.ai/api/repos/ox/Oxen-Character-Simple-Vector-Graphic/file/main/images/reference/bloxy_white_bg.png", "prompt": "an ox holding a sign that says 'Oxen.ai'"}, {"ctrl_img_url": "https://hub.oxen.ai/api/repos/ox/Oxen-Character-Simple-Vector-Graphic/file/main/images/reference/bloxy_white_bg.png", "prompt": "a herd of oxen running in a field"}]

steps

Steps Type: integer Default: 3000 Minimum: 1

timestep_type

Timestep Type Type: string Default: "weighted" Options: weighted, sigmoid, linear

use_lora

Use LoRA Type: boolean Default: true