flux-dev-lora
Text-to-image and image-to-image generation with custom LoRA weights from HuggingFace
Text-to-image and image-to-image generation with custom LoRA weights from HuggingFace
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
Price: 0.01$ / image
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
}
}'
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
}
}'
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:
{
"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"
}
}
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
}
}'
| Parameter | Type | Description |
|---|---|---|
| prompt | string | Text description of the desired output |
| 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) |
| 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 |
| 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) |