IntermediateUpdated Dec 14, 2025
Image-to-Image Transformations
Transform existing images with AI - from style transfer to variations and controlled edits using image prompts.
JL
Jordan Lee
Platform Engineer
10 min read
What is Image-to-Image?
Image-to-image generation uses an existing image as a starting point, allowing you to:
- Apply artistic styles to photos
- Create variations of existing images
- Transform sketches into detailed artwork
- Edit specific parts of images
Basic Image-to-Image
python
from abstrakt import AbstraktClient
client = AbstraktClient()
result = client.run("fal-ai/flux/dev/image-to-image", {
"input": {
"image_url": "https://example.com/your-image.jpg",
"prompt": "Transform into a watercolor painting",
"strength": 0.75
}
})Understanding Strength
The strength parameter (0.0 to 1.0) controls how much the output differs from the input:
- 0.1-0.3: Subtle changes, preserves most of original
- 0.4-0.6: Moderate transformation, balanced
- 0.7-0.9: Strong transformation, keeps composition
- 1.0: Complete reimagining
Style Transfer Examples
Photo to Oil Painting
python
result = client.run("fal-ai/flux/dev/image-to-image", {
"input": {
"image_url": "https://example.com/landscape.jpg",
"prompt": "oil painting, thick brushstrokes, impressionist style, vibrant colors",
"strength": 0.65
}
})Photo to Anime
python
result = client.run("fal-ai/flux/dev/image-to-image", {
"input": {
"image_url": "https://example.com/portrait.jpg",
"prompt": "anime style, studio ghibli, detailed, beautiful",
"strength": 0.7
}
})Day to Night
python
result = client.run("fal-ai/flux/dev/image-to-image", {
"input": {
"image_url": "https://example.com/city-day.jpg",
"prompt": "nighttime, city lights, neon signs, dramatic lighting",
"strength": 0.6
}
})Creating Variations
Generate multiple variations of an image:
python
def create_variations(image_url, num_variations=4):
variations = []
for i in range(num_variations):
result = client.run("fal-ai/flux/dev/image-to-image", {
"input": {
"image_url": image_url,
"prompt": "Create a variation, same style and subject",
"strength": 0.3,
"seed": i * 1000 # Different seed for each
}
})
variations.append(result.images[0].url)
return variationsSketch to Image
Transform rough sketches into detailed artwork:
python
result = client.run("fal-ai/flux/dev/image-to-image", {
"input": {
"image_url": "https://example.com/sketch.png",
"prompt": "detailed digital art, professional illustration, vibrant colors",
"strength": 0.85
}
})Best Practices
- Start with lower strength - You can always increase it
- Use detailed prompts - Be specific about the desired output
- Match aspect ratios - Keep input/output ratios consistent
- Use high-quality inputs - Better input = better output
Common Issues & Solutions
| Issue | Solution |
|---|---|
| Output too similar | Increase strength |
| Lost important details | Decrease strength |
| Unexpected colors | Add color terms to prompt |
| Wrong style | Be more specific in prompt |
Next Steps
- Master prompting techniques
- Create custom LoRA models
- Try batch processing
#image-to-image#style-transfer#variations