- Create an image-editing fine-tune
- Start the fine-tune run
- Monitor the fine-tune until it completes
- Deploy the fine-tuned model
- Run inference with the deployed model
Available Fine-Tuning Models:
base_model:Qwen/Qwen-Image-Editscript_type:image_editing
control_image_column– Input/reference image to editcaption_column– Text prompt describing the desired editimage_column– Target/output image after the edit
Prerequisites
- Repository on Oxen with your training data committed, for example:
- Namespace:
Tutorials - Repository:
ProductImageEdits
- Namespace:
- Dataset resource inside that repo, for example:
main/train_image_edits.parquet- Each row contains paths to the control image and edited image, plus a caption.
- API key with access to the repo:
- Exported as
OXEN_API_KEY
- Exported as
- Base URL for the Oxen API:
- Cloud example:
https://hub.oxen.ai - Exported as
OXEN_BASE_URL(optional, defaults shown below)
- Cloud example:
resource:main/train_image_edits.parquetbase_model:Qwen/Qwen-Image-Editscript_type:image_editing
control_image_column:control_imagecaption_column:captionimage_column:edited_imageepochs:1batch_size:1learning_rate:0.0001grad_accum:1lora_alpha:16lora_rank:16seq_length:1024logging_steps:10enable_thinking:falseneftune_noise_alpha:0.0save_steps_ratio:0.25save_strategy:epochuse_lora:true
Step 1 – Create an Image Editing Fine-Tune
EndpointPOST /api/repos/{owner}/{repo}/fine_tunes
curl request:
fine_tune object. For example:
id (for example ft_img_12345) for the next steps.
If you have jq installed, you can capture it directly:
Step 2 – Start the Fine-Tune Run
Once you have afine_tune.id, trigger the run.
Endpoint
POST /api/repos/{owner}/{repo}/fine_tunes/{fine_tune_id}/actions/run
curl request:
Step 3 – Monitor Fine-Tune Status
You can poll the fine-tune to see when it completes. EndpointGET /api/repos/{owner}/{repo}/fine_tunes/{fine_tune_id}
curl loop (bash):
Step 4 – Deploy the Fine-Tuned Image Model
Once the fine-tune completes, you can deploy it to a dedicated GPU-backed endpoint via the deploy API. EndpointPOST /api/repos/{owner}/{repo}/fine_tunes/{fine_tune_id}/deploy
curl request:
oxen:your-fine-tuned-image-edit-model).
If the response contains a field like model_slug, you can capture it with jq:
Step 5 – Run Inference with the Deployed Model
With the deployment live, you can call the image editing inference endpoint using the deployed model identifier. EndpointPOST /api/images/edit
curl request (single input image):
model value instead of a base model.
For more background on the image editing inference API, see the
Image Editing examples.
With these five steps, you have a complete end-to-end image fine-tuning, deployment, and inference workflow using only curl, fully scriptable from the command line.