---
title: "flux-dev-lora"
description: "Flux.1 Dev with LoRA support for custom styles and image editing"
url: "https://docs.api.pruna.ai/guides/models/flux-dev-lora"
image: "https://docs.api.pruna.ai/_og/d/c_Ocean.takumi,title_flux-dev-lora,description_Flux.1+Dev+with+LoRA+support+for+custom+styles+and+image+editing,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiM3YzNhZWQifX19,p_Ii9ndWlkZXMvbW9kZWxzL2ZsdXgtZGV2LWxvcmEi,s_GvgjaGPxdiLtQH00.png"
---

# flux-dev-lora

Text-to-image and image-to-image generation with custom LoRA weights from HuggingFace

## [Overview](#overview)

flux-dev-lora extends the Flux.1-dev model with support for custom LoRA (Low-Rank Adaptation) weights from HuggingFace. This allows you to apply specialized styles, techniques, or character designs to your generations. It supports both text-to-image and image-to-image workflows.

**Rate Limit:** 150 requests per minute

**Category:** Image Editing

**Pricing:**

| num_outputs | Price         |
| :---------- | :------------ |
| 1 (default) | $0.01 / image |
| 2           | $0.02 / image |
| 3           | $0.03 / image |
| 4           | $0.04 / image |

## [Quickstart](#quickstart)

### [Text-to-Image with LoRA (Asynchronous)](#text-to-image-with-lora-asynchronous)

```bash
curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: flux-dev-lora' \
  -d '{
    "input": {
      "prompt": "Long toons, a close-up of a cartoon character with a red backdrop",
      "lora": "prithivMLmods/Flux-Long-Toon-LoRA",
      "lora_scale": 1,
      "aspect_ratio": "1:1",
      "num_inference_steps": 28
    }
  }'
```

### [Text-to-Image with LoRA (Synchronous)](#text-to-image-with-lora-synchronous)

```bash
  curl -X POST 'https://api.pruna.ai/v1/predictions' \
    -H 'Content-Type: application/json' \
    -H 'apikey: YOUR_API_KEY' \
    -H 'Model: flux-dev-lora' \
    -H 'Try-Sync: true' \
    -d '{
      "input": {
        "prompt": "Long toons, a close-up of a cartoon character with a red backdrop",
        "lora": "prithivMLmods/Flux-Long-Toon-LoRA",
        "lora_scale": 1,
        "aspect_ratio": "1:1",
        "num_inference_steps": 28
      }
    }'
```

### [Image-to-Image with LoRA](#image-to-image-with-lora)

#### [Start with uploading an image](#start-with-uploading-an-image)

```bash
curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: YOUR_API_KEY" \
  -F "content=@/path/to/your/file.jpg"
```

Note: Use -F (form) with @ prefix to upload a file from your local filesystem. The file path should be absolute or relative to your current directory.

Response:

```text
{
  "id": "fqadqq42xq",
  "name": "test.jpg",
  "content_type": "image/jpeg",
  "size": 185093,
  "etag": "\"14e9a51deaac6bee2dd8b5c52d7d0b5f\"",
  "checksums": {
    "sha256": "aa10d5d09bcee5cb5d854bd81899308b0cf0c0c50e29d4f00c2c06e51f0e2fe6"
  },
  "metadata": {
    "content_length": 185093,
    "width": 1344,
    "height": 768
  },
  "created_at": "2025-01-08T18:51:26.729Z",
  "expires_at": "2025-01-09T18:51:26.729Z",
  "urls": {
    "get": "https://api.pruna.ai/v1/files/fqadqq42xq"
  }
}
```

#### [Use the image in urls/get in the "image" input field](#use-the-image-in-urlsget-in-the-image-input-field)

```bash
  curl -X POST 'https://api.pruna.ai/v1/predictions' \
    -H 'Content-Type: application/json' \
    -H 'apikey: YOUR_API_KEY' \
    -H 'Model: flux-dev-lora' \
    -d '{
      "input": {
        "prompt": "Transform into watercolor painting style",
        "image": "https://api.pruna.ai/v1/files/fqadqq42xq",
        "lora": "your-username/watercolor-lora",
        "prompt_strength": 0.8,
        "lora_scale": 1.2
      }
    }'
```

### [Parameters](#parameters)

#### [Required Parameters](#required-parameters)

| Parameter | Type   | Description                            |
| :-------- | :----- | :------------------------------------- |
| prompt    | string | Text description of the desired output |

#### [LoRA Parameters](#lora-parameters)

| Parameter        | Type   | Default | Description                                      |
| :--------------- | :----- | :------ | :----------------------------------------------- |
| lora             | string | -       | HuggingFace LoRA URL (e.g., "owner/model-name")  |
| lora_scale       | number | 1       | LoRA application strength (-1 to 3)              |
| extra_lora       | string | -       | Second HuggingFace LoRA URL for combining styles |
| extra_lora_scale | number | 1       | Second LoRA application strength (-1 to 3)       |

#### [Image-to-Image Parameters](#image-to-image-parameters)

| Parameter       | Type         | Default | Description                                                             |
| :-------------- | :----------- | :------ | :---------------------------------------------------------------------- |
| image           | string (URI) | -       | Input image URL for img2img mode                                        |
| prompt_strength | number       | 0.8     | How much to transform the input image (0-1). Lower = closer to original |

#### [Generation Parameters](#generation-parameters)

| Parameter           | Type    | Default     | Description                                                                      |
| :------------------ | :------ | :---------- | :------------------------------------------------------------------------------- |
| num_outputs         | integer | 1           | Number of images to generate (1-4)                                               |
| num_inference_steps | integer | 28          | Number of denoising steps                                                        |
| guidance            | number  | 3           | Guidance scale (0-10)                                                            |
| seed                | integer | random      | Random seed for reproducibility                                                  |
| aspect_ratio        | string  | "1:1"       | Options: "1:1", "16:9", "21:9", "3:2", "2:3", "4:5", "5:4", "3:4", "4:3", "9:16", "9:21" |
| megapixels          | string  | "1"         | Output resolution: "1" (1MP) or "0.25" (0.25MP)                                  |
| speed_mode          | string  | "Juiced 🧃" | Options: "Base Model (compiled)", "Lightly Juiced 🍊", "Juiced 🧃", "Extra Juiced 🔥" |
| output_format       | string  | "jpg"       | "png", "jpg", or "webp"                                                          |
| output_quality      | integer | 80          | Quality for jpg/webp (1-100)                                                     |