CartVisualCreate account

Should I use a mask or image context for a product edit in FASHN?

Use a mask to guide where FASHN Edit should change an image. Use `image_context` to show the look you want, such as a specific surface or pose. Keep the required prompt explicit about the change. A mask and a visual reference can solve different problems in the same job.

Published ยท By CartVisual editorial team

Encode the region you can afford to change

Make the mask the same pixel dimensions as the source image. FASHN documents fully white pixels as the editing priority and black pixels as regions to preserve. Give yourself safe space near a label or a narrow strap when defining the region. The reference warns that nearby pixels can still change to integrate the edit. Treat an intact edge as an acceptance check.

Use visual context when natural language leaves the intended look under-specified. For instance, use an approved matte linen sample to clarify which fabric texture a background should resemble. The sample guides appearance. It does not designate which part of the source should be repainted.

Example: replace the surface behind a shoe

  1. Use the approved shoe photo as the source. Keep the shoe silhouette, tongue label and stitching unobscured in that file.
  2. Write a prompt that describes the intended surface and says the shoe remains in place. If the approved texture matters, include it as image_context.
  3. Use a mask to prioritize the surrounding region. Inspect the sole boundary against the original. Review small details on the shoe even if the background now matches the intended texture.
  4. If the sole or label changes, reject the output for the listing. For a must-preserve shoe, consider using the original cutout over the new surface and checking the composited edge.

The shoe example is illustrative. The FASHN reference specifies the controls and describes the endpoint as experimental. Judge the actual result before substituting it for an approved catalog image.

FASHN Edit inputs and mask behavior

Related decisions

Browse ecommerce creative workflows