{"record":{"id":"f092894a5469215c","repo":"Comfy-Org/ComfyUI","slug":"character-mask-and-image-must-be-the-same-size","errorCode":null,"errorMessage":"Character mask and image must be the same size","messagePattern":"Character mask and image must be the same size","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_ideogram.py","lineNumber":278,"sourceCode":"\n        if character_image is not None:\n            input_tensor = character_image.squeeze().cpu()\n            if character_mask is not None:\n                character_mask = resize_mask_to_image(character_mask, character_image, allow_gradient=False)\n                character_mask = 1.0 - character_mask\n                if character_mask.shape[1:] != character_image.shape[1:-1]:\n                    raise Exception(\"Character mask and image must be the same size\")\n\n                mask_np = (character_mask.squeeze().cpu().numpy() * 255).astype(np.uint8)\n                mask_img = Image.fromarray(mask_np)","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_ideogram.py#L260-L296","documentation":"Error \"Character mask and image must be the same size\" thrown in Comfy-Org/ComfyUI.","triggerScenarios":"Thrown at comfy_api_nodes/nodes_ideogram.py:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Resize the character mask so it matches the character image dimensions."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}