GLM-Image model weights are available on Hugging Face. Download

Edit Images · Subject-preserving Workflow

AI Background Changer with GLMImage

Move a person, product or object into a new environment while preserving the subject and rebuilding perspective, ambient color, reflections and contact shadows so the result feels like one coherent photograph.

  • Prompt optional in guided mode
  • One required source plus optional scene reference
  • Source-ratio output by default
  • Subject identity and edge preservation
Before and after example made with an AI background changer

AI Background Changer with GLMImage

Add image

Background replacement is a scene reconstruction problem

Removing a background is only the first half of a useful edit. A convincing replacement must decide where the subject stands, how large it appears, which direction the new light travels, what color the environment reflects onto edges and where contact shadows anchor the subject. This AI background changer uses a scene-aware GLMImage editing recipe rather than treating the subject as a sticker pasted onto a new picture.

The built-in instruction preserves identity, pose, clothing, product geometry and fine edge detail while asking the model to rebuild the new environment around them. That makes the workflow useful for portraits, catalog products, campaign assets, property concepts and editorial images. Select the scene, upload a base image and generate with no extra prompt when a tasteful premium environment is enough. Add a short instruction when you need a specific location, season, brand mood or element to remain unchanged.

One image is required; a second reference is optional

The first upload is always the base image. It defines the person, product or object that must survive the edit. A second image can act as a target-scene reference. Use it when the new environment has a specific architecture, color language, lighting pattern or location that would be cumbersome to describe. The default action remains available with only the base image, so users do not need to collect a reference for every simple background change.

When you include a second image, state its role rather than expecting the model to infer it. A useful instruction is: keep the ceramic lamp from image one exactly, and use image two only as a reference for the warm plaster interior and afternoon light. This protects the source subject from accidental blending. Do not upload images you lack permission to use, and remember that reference images remain private when you submit a generated result to the public Gallery.

How to describe the new scene

Describe environment before decoration. Name the location, surface, depth, time of day and lighting character. For a product, include how it contacts the surface and whether it should cast a soft or crisp shadow. For a portrait, describe background distance and depth of field so hair and clothing edges remain believable. “A quiet contemporary hotel lobby, pale stone floor, warm indirect morning light, shallow background focus” is more actionable than “make it luxurious.”

Then list preservation constraints. Tell the AI background changer to keep the subject’s face, pose, garment, logo, packaging shape or camera crop unchanged. If one visible feature is critical, name it. Avoid contradictory requests such as preserving all original light while moving from noon sunlight into a dark nightclub. Ask the model to relight the subject naturally for the target environment while preserving identity and material truth.

  • Base image subject to preserve
  • Target location and physical surface
  • Time, weather and ambient palette
  • Perspective and depth-of-field expectation
  • Contact shadow and reflection behavior
  • Critical identity, logo or product details to keep

Output size follows the source composition

When the first reference finishes uploading, the editor reads its aspect ratio and selects a valid output size with the same overall shape. That protects the source composition and reduces accidental cropping. The production image APIs require width and height aligned to multiples of 32. You can still choose a preset or custom size when the edited asset must fit a different channel.

A new ratio may require genuine recomposition rather than simple expansion. If you turn a square product shot into a wide banner, explain where the additional scene should appear and where copy space is needed. If you convert a landscape portrait into a vertical story, state whether the model should extend above and below or create a tighter crop. Custom dimensions stay within 256–1536 pixels for the active provider; both values must be divisible by 32.

Business uses for an AI background changer

E-commerce teams can adapt one clean product photograph for seasonal campaigns, marketplace listings and lifestyle placements. Brand teams can test a product in several art directions before committing to a physical shoot. Portrait photographers can create location variations from an authorized subject image. Social teams can extend a campaign into platform-specific crops while preserving the recognizable hero asset. Property and hospitality teams can explore atmosphere changes without rebuilding the whole composition.

The workflow works best when the base subject is reasonably clear and not heavily occluded by the old background. Transparent objects, flyaway hair, reflective packaging and complex shadows require closer review because the old scene is visually entangled with the subject. Generate more than one candidate, zoom into edges and compare product or facial details with the source. Speed is valuable only when the final asset remains truthful.

For regulated channels, keep a clear record of the edit. A product image on a marketplace, a food label, a pharmaceutical or a real-estate listing must still represent the actual item and setting accurately after the background is replaced — do not use the tool to imply a feature, certification or location the real product does not have. Save the unedited source alongside the final asset so a compliance or returns team can confirm what was changed. Used this way, background replacement accelerates variations while keeping the representation honest.

Review the composite like a retoucher

Start at the boundary: inspect hair, fingers, transparent material, product handles and any thin structure. Then inspect contact: does the subject sit on the surface, and do shadow direction and softness match the new light? Check reflections in glossy objects and color spill along edges. Finally compare the source identity, proportions, packaging and visible text. Small changes can turn a valid commercial product into an inaccurate representation.

If the result is close, refine one issue. Ask for a softer contact shadow without changing the subject, or request more background blur while keeping the crop. If the subject itself drifted, restate the preservation constraints and simplify the target scene. A focused second pass is usually more successful than adding unrelated style language. Download the accepted result and keep the original source available for visual verification and future edits.

Practical starting points

Prompt examples for AI background changer

Use these as structures, not magic phrases. Replace the subject, purpose and constraints with details from your own project.

Product lifestyle scene

Keep the ceramic table lamp, proportions, shade texture and brass switch exactly as in the base image. Place it on a pale oak side table in a calm contemporary bedroom, warm early-evening ambient light, realistic soft contact shadow, subtle wall texture, shallow background depth, no added text or objects touching the product.

Preserves product truth while specifying surface, environment, light and contact.

Portrait location change

Preserve the person’s face, hair, pose and blue jacket. Move them into a quiet modern library with tall warm wood shelves, soft window light from the left, natural depth of field and believable edge light. Keep the original waist-up crop and do not add accessories.

Separates identity constraints from the new location and relighting.

Use a scene reference

Use image one as the only source for the skincare bottle and label. Use image two only as a reference for the stone pedestal, misty green palette and diffused top light. Create one coherent premium campaign photograph with accurate scale, reflections and contact shadow.

Assigns explicit roles to both uploads to reduce unwanted identity mixing.

Focused workflow

From input to reviewed image in four steps

1

Choose Change Background or Scene

The editor loads subject-preservation and realistic integration guidance.

2

Upload the base image

Use a clear, authorized source containing the person, product or object to preserve.

3

Optionally add a scene reference or prompt

The built-in action works alone; add direction only for a specific environment.

4

Generate and inspect the edges

Review identity, shape, contact shadows, reflections, perspective and visible text.

Frequently asked questions

Do I have to write a prompt?

No. In the guided Change Background workflow, the built-in action can create a clean premium environment. Add a prompt when you need a particular location, mood or preservation constraint.

How many images can I upload?

One base image is required. A second target-scene reference is optional. The roles are shown above the uploader.

Will the AI background changer preserve the person or product?

The recipe explicitly prioritizes identity, pose, product geometry and edge detail, but every output must still be visually checked against the source.

Does the output keep my source aspect ratio?

Yes, the editor derives a 32-aligned size from the first uploaded image. You can override it with a preset or valid custom size.

Why must dimensions be divisible by 32?

The active production image APIs require aligned dimensions. The interface uses valid presets and validates custom dimensions before a task is submitted.

Are my reference images published to the Gallery?

No. Only the generated result and its visible prompt are submitted if you explicitly choose to publish. Reference images remain private.

Can I change a product background for e-commerce?

Yes. Preserve packaging, shape, material and label details in the instruction, then carefully verify the result before using it as a product representation.

What should I check before downloading?

Inspect subject edges, face or product identity, text, scale, contact shadows, reflections, light direction and any material that was transparent or glossy.

Create the first version now

The workflow and its core prompt are already available in the generator. The page gives you the brief; the selected tool turns it into an image.

Open the selected workflow