---
title: "p-image-edit-trainer"
url: "https://docs.api.pruna.ai/apis/models-api-0/versions/7dfbc266-0f94-4c90-8518-d9e4d1a245ec/schemas/p-image-edit-trainer"
---

> Full API specification: https://docs.api.pruna.ai/apis/models-api-0/versions/7dfbc266-0f94-4c90-8518-d9e4d1a245ec.md

# p-image-edit-trainer

Train custom LoRA models for use with p-image-edit-lora. The training job returns a zip file containing the trained LoRA weights, which must be uploaded to HuggingFace. Use the HuggingFace repository URL with p-image-edit-lora model. Rate limit: 5 requests per minute.

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: P-API
  version: 0.3.0
servers:
  - url: https://api.pruna.ai
    description: Production server
components:
  schemas:
    p-image-edit-trainer:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          properties:
            steps:
              title: Steps
              default: 1000
              maximum: 5000
              minimum: 100
              multipleOf: 100
              description: Number of steps to train for (must be a multiple of 100)
              type: integer
            image_data:
              title: Image Data
              format: uri
              description: "Zip archive with pairs of images for edit training. Images should
                be named ROOT_start.EXT and ROOT_end.EXT (e.g., photo_start.jpg
                and photo_end.jpg). Can include multiple reference images:
                ROOT_start.EXT, ROOT_start2.EXT, ROOT_start3.EXT, ...,
                ROOT_end.EXT. Can also contain text files (ROOT.txt) to specify
                edit instructions for each image pair. You can also pass a URL
                pointing to the zip file instead of uploading a file directly."
              type: string
            learning_rate:
              title: Learning Rate
              default: 0.0001
              maximum: 0.01
              minimum: 0.00001
              description: Learning rate for LoRA parameters
              type: number
            default_caption:
              title: Default Caption
              description: Default caption to use when caption files are missing. If not
                provided and captions are missing, training will fail.
              type: string
          required:
            - image_data
          additionalProperties: false
      description: "Train custom LoRA models for use with p-image-edit-lora. The
        training job returns a zip file containing the trained LoRA weights,
        which must be uploaded to HuggingFace. Use the HuggingFace repository
        URL with p-image-edit-lora model. Rate limit: 5 requests per minute."
```
