Titan vs Nova Canvas image masks: which colour is edited

Titan says mask value 0 (black) is regenerated and bans alpha. Nova Canvas inpainting edits black too. Build one mask check and test any mask on Sume.

4 min readSume
All posts

Mask conventions are where image APIs disagree, and a flipped mask edits everything except the area you wanted. Amazon's two image models on Bedrock give the same answer for inpainting, but the two pages describe different file rules.

Mask rules (Amazon Bedrock and Nova docs, read 2026-10-06)
RuleTitan Image GeneratorNova Canvas
Edited areaMask value 0 (black) is regeneratedInpainting: pure black is edited, pure white is kept
Allowed valuesOnly black (0) and white (255)Only pure black and pure white
SizeSame height and width as the inputSame size as the input
AlphaNot supported; RGB onlyPNG input must have no transparent pixels
EncodingmaskImage is a base64 stringJPEG mask must be saved at 100% quality

A mask checker

This script flags the three mistakes that cause most failures: wrong size, gray pixels and an alpha channel. It does not tell you which colour a given service edits; that is the table above.

from PIL import Image
import numpy as np

def check_mask(src_path: str, mask_path: str) -> list[str]:
    src, mask = Image.open(src_path), Image.open(mask_path)
    problems = []
    if src.size != mask.size:
        problems.append(f"size {mask.size} != {src.size}")
    if "A" in mask.getbands():
        problems.append("mask has an alpha channel")
    px = np.asarray(mask.convert("L"))
    gray = int(((px != 0) & (px != 255)).sum())
    if gray:
        problems.append(f"{gray} gray pixels")
    return problems

print(check_mask("photo.png", "mask.png") or "mask ok")

On Sume

Only the two ChatGPT Image 2.5 variants take mask_url. The Sume docs do not state the colour convention for it, and the earlier post on the mask alpha channel covers what to send. Treat the first call as a test: make a mask with a clear left half, send it, and see which half changed, then diff with the numpy check.

Sources

Related posts

More in Comparisons

All Comparisons posts

Written by Sume