TotalApp Docs

Magic Replace

Transform your images with intelligent background replacement using AI-powered prompt generation and seamless image blending.

Key Features

AI Prompt Writer

Generate intelligent background prompts automatically based on your image content, mood, and scene composition.

Match the Mood

Create backgrounds that perfectly complement the original scene's atmosphere, lighting, and emotional tone.

Reimagine the Scene

Transform images with completely different artistic backgrounds — from fantasy landscapes to futuristic cityscapes.

Drag & Drop Interface

Easy image upload with instant processing. Simply drag your image onto the canvas and start replacing backgrounds.

Image Search

Find reference images from an extensive library to use as background references for precise replacements.

Custom Prompts

Write your own detailed background descriptions for maximum creative control over the final result.

Negative Prompts

Exclude unwanted elements from the final result by specifying what should not appear in the generated background.

Multiple Rendering Modes

Choose between speed and quality to balance processing time with the fidelity of the output image.

Batch Processing

Replace backgrounds on multiple images at once, saving time when working with large collections of photos.

Getting Started

Magic Replace allows you to replace backgrounds in your images using three different methods. Choose the approach that best suits your workflow and creative goals.

Method 1: Upload a Reference Image

Upload a second image to use as a background reference. The first image's subject is kept while the reference image's background style is applied to it.

1. Upload base image 2. Upload or search reference background 3. Click Replace Background 4. Download result

Method 2: AI Prompt Writer

Use the built-in AI to generate intelligent background prompts based on your uploaded image. The AI analyzes your image and produces a prompt tailored to your selected mode.

1. Upload base image 2. Choose mood or reimagine mode 3. AI generates prompt 4. Replace Background

Method 3: Custom Prompts

Write your own detailed background description for maximum creative control. This gives you precise control over every aspect of the generated background.

1. Upload base image 2. Write background description 3. Include lighting, mood, colors 4. Replace Background

AI Prompt Writer

The AI Prompt Writer is the most advanced feature of Magic Replace, offering two distinct approaches to background generation based on your creative intent.

Match the Mood

This mode analyzes your image's atmosphere, lighting, and emotional tone to generate background prompts that perfectly complement the original scene. The AI considers multiple factors to ensure visual harmony:

  • Color Palette: Analyzes dominant colors and creates harmonious backgrounds that feel naturally connected to the subject.
  • Lighting Conditions: Matches the lighting style — natural, artificial, dramatic, or soft — so the subject and background feel illuminated by the same source.
  • Mood & Atmosphere: Preserves the emotional tone of the original image, whether calm, energetic, mysterious, or joyful.
  • Visual Consistency: Ensures the new background feels natural and compositionally balanced with the subject.

Reimagine the Scene

This mode creates entirely different backgrounds that offer artistic contrast while maintaining perfect composition. It is ideal when you want a dramatic transformation rather than a seamless extension of the original scene.

  • Creative Transformations: Fantasy landscapes, futuristic cityscapes, abstract environments, and more.
  • Artistic Styles: Cinematic, surreal, minimalist, or dramatic backgrounds tailored to your subject.
  • Compositional Balance: Maintains proper subject placement and visual hierarchy despite the radical background change.
  • Unlimited Possibilities: From realistic locations to completely imaginative settings limited only by your prompt.

Writing Effective Custom Prompts

When writing your own background prompts, including specific key elements significantly improves the quality and relevance of the generated result.

Essential Elements to Include

  • Setting Description: Describe the location clearly — "A bustling city street at night" or "A serene mountain lake at sunset".
  • Lighting Details: Specify the light quality — "Soft golden hour lighting" or "Dramatic shadows and highlights".
  • Color Palette: Name the tones you want — "Warm orange and pink tones" or "Cool blue and purple hues".
  • Atmosphere: Describe the feeling — "Mysterious and moody" or "Bright and cheerful".
  • Style References: Add artistic direction — "Cinematic style", "Minimalist aesthetic", or "Impressionist painting".

Example Prompts

Good Example

"Replace with a bustling city street at night, neon lights reflecting on wet pavement, dramatic shadows, cinematic lighting, urban atmosphere, warm orange and blue tones"

Better Example

"Transform to a serene mountain lake at sunset, soft golden hour lighting, misty atmosphere, peaceful and tranquil mood, warm orange and pink tones, cinematic style, depth of field"

Prompt Writing Tips

  • Be specific about time of day — morning, noon, sunset, night all produce very different results.
  • Mention weather conditions when relevant — overcast, sunny, foggy, stormy.
  • Reference well-known visual styles — "shot on 35mm film", "Studio Ghibli style", "HDR photography".
  • Describe depth — "shallow depth of field with blurred background" to keep focus on the subject.

Technical Specifications

Magic Replace is designed to work with high-quality images within the following technical parameters to ensure the best possible results.

Specification Value
Supported Formats JPG, PNG, WebP
Maximum File Size 10 MB per image
Maximum Image Dimensions Up to 4096 × 4096 pixels
Typical Processing Time 30–60 seconds per image
AI Model Advanced computer vision and NLP
Batch Processing Multiple images per session

Best Practices

Tips for Better Results

  • High-Quality Source Images: Use clear, well-lit images with good resolution. Low-quality or heavily compressed source images reduce output fidelity.
  • Clear Subject Separation: Ensure your subject has clear edges and good contrast with the existing background. This helps the AI accurately isolate the subject.
  • Detailed Prompts: The more specific your description, the better the result. Vague prompts like "nice background" produce generic results.
  • Experiment with Styles: Try different artistic approaches — the same subject with different background styles can produce dramatically different creative outcomes.
  • Use Reference Images: When possible, provide visual references for complex or highly specific backgrounds you have in mind.
  • Iterate and Refine: If the first result is not quite right, refine your prompt and regenerate. Small changes in wording can produce significantly different results.

Troubleshooting

Common Issues and Solutions

Issue Cause Solution
Poor subject detection Subject lacks clear edges or has similar color to background Use images where the subject has clear contrast with the background
Unrealistic result Prompt too vague or conflicting lighting instructions Add more specific lighting and perspective details to your prompt
Processing error Image exceeds size or format requirements Ensure the image is JPG, PNG, or WebP and under 10 MB
AI prompt not working well Generated prompt does not match your vision Edit the AI-generated prompt manually or switch to custom prompt mode
Background bleeds into subject Subject edges not well-defined in source image Try an image with sharper subject edges, or run Remove Background first

Important Note

Magic Replace works best with images where the main subject is clearly defined against its background. Highly complex subjects with thin details (fine hair, transparent objects, intricate patterns) may require additional refinement after generation.

Related Features

Magic Replace works seamlessly alongside other Creator Tools AI features. Consider combining these tools for advanced image workflows:

Remove Background

Use Remove Background first to cleanly isolate your subject, then apply Magic Replace for even better edge quality in complex subjects.

Upscale

After replacing the background, run Upscale to enhance the final image resolution and recover fine detail in the composite result.

Magic Fill

Use Magic Fill to refine specific areas of the replaced background, correcting any inconsistencies or adding details after the initial replacement.

Image Generation

Generate a custom background image first using Image Generation, then use that generated image as a reference for Magic Replace.

Frequently Asked Questions

Can I use Magic Replace on images with transparent backgrounds?
Yes. If your image already has a transparent background (PNG with alpha channel), Magic Replace will respect the transparency and generate a background without needing to detect the subject edges again.
How does the AI determine what counts as the "background"?
The AI uses a combination of semantic segmentation and depth estimation to identify the primary subject of the image. It looks for the most prominent, well-defined object and treats everything behind it as background. You can improve this by ensuring the subject is clearly centered and well-lit.
What is the difference between "Match the Mood" and "Reimagine the Scene"?
Match the Mood generates backgrounds that harmonize with the existing atmosphere, colors, and lighting of your image — the result feels like a natural extension of the original scene. Reimagine the Scene creates a completely different environment, prioritizing creative contrast and artistic transformation over visual continuity.
Can I edit the AI-generated prompt before using it?
Yes. The AI-generated prompt is fully editable. After the AI suggests a prompt, you can modify any part of it — add, remove, or change elements — before clicking Replace Background. This gives you the efficiency of AI assistance combined with full creative control.
How many images can I process in a batch?
Batch processing capacity depends on your plan. The same prompt and settings are applied to all images in a batch, making it efficient for product photography, portrait sessions, or any collection where consistent backgrounds are needed.
Does Magic Replace work with RAW image files?
Magic Replace currently supports JPG, PNG, and WebP formats. RAW files must be converted to one of these formats before uploading. Most photo editing software can export RAW files to JPG or PNG with high quality settings.