{"record":{"id":"5e16fb8f6aa74505","repo":"Comfy-Org/ComfyUI","slug":"selected-resolution-resolution-target-size-x-t","errorCode":null,"errorMessage":"Selected resolution {resolution} ({target_size}x{target_size}) is smaller than the input video ({src_width}x{src_height}). Please select a higher resolution or 'original'.","messagePattern":"Selected resolution (.+?) \\((.+?)x(.+?)\\) is smaller than the input video \\((.+?)x(.+?)\\)\\. Please select a higher resolution or 'original'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_hitpaw.py","lineNumber":281,"sourceCode":"\n    @classmethod\n    async def execute(\n        cls,\n        model: InputVideoModel,\n        video: Input.Video,\n    ) -> IO.NodeOutput:\n        validate_video_duration(video, min_duration=0.5, max_duration=60 * 60)\n        resolution = model[\"resolution\"]\n        src_width, src_height = video.get_dimensions()\n\n        if resolution == \"original\":\n            output_width = src_width\n            output_height = src_height\n        else:\n            if src_width == src_height:\n                target_size = RESOLUTION_SQUARE_MAP[resolution]\n                if target_size < src_width:\n                    raise ValueError(\n                        f\"Selected resolution {resolution} ({target_size}x{target_size}) is smaller than \"\n                        f\"the input video ({src_width}x{src_height}). Please select a higher resolution or 'original'.\"\n                    )\n                output_width = target_size\n                output_height = target_size\n            else:\n                min_dimension = min(src_width, src_height)\n                target_size = RESOLUTION_TARGET_MAP[resolution]\n                if target_size < min_dimension:\n                    raise ValueError(\n                        f\"Selected resolution {resolution} ({target_size}p) is smaller than \"\n                        f\"the input video's shorter dimension ({min_dimension}p). \"\n                        f\"Please select a higher resolution or 'original'.\"\n                    )\n                if src_width > src_height:\n                    output_height = target_size\n                    output_width = int(target_size * (src_width / src_height))\n                else:","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_hitpaw.py#L263-L299","documentation":"Thrown by Hitpaw video enhancement for square input videos (src_width == src_height) when the selected resolution maps (via RESOLUTION_SQUARE_MAP) to a target smaller than the source. Enhancing below source resolution would downscale the video, which the node blocks; the message suggests a higher resolution or 'original'.","triggerScenarios":"Input video is square (e.g. 1024x1024) and resolution is set to a square target smaller than 1024 (e.g. '720'), producing target_size < src_width.","commonSituations":"Square AI-generated videos fed with a default 720p-style resolution widget; users assuming the setting is an output cap rather than a floor.","solutions":["Select a resolution whose square target is >= the source side, or 'original' to keep source dimensions","Or pre-downscale the square video to below the chosen target before the node"],"exampleFix":"# before: 1024x1024 input, resolution='720' -> error\n# after: resolution='1080'  # or 'original'","handlingStrategy":"validation","validationCode":"from comfy_api_nodes.nodes_hitpaw import RESOLUTION_SQUARE_MAP\n\ndef square_resolution_ok(video, resolution: str) -> bool:\n    if resolution == 'original':\n        return True\n    w, h = video.get_dimensions()\n    return w != h or RESOLUTION_SQUARE_MAP[resolution] >= w","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use 'original' when the source resolution is already acceptable","Treat the resolution widget as a floor, not a cap — it must be >= source"],"tags":["hitpaw","video-enhance","resolution","input-validation"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}