{"record":{"id":"419c344d9d1591d5","repo":"Comfy-Org/ComfyUI","slug":"asset-video-aspect-ratio-w-h-must-be-in-0-4-2","errorCode":null,"errorMessage":"Asset video aspect ratio (W/H) must be in [0.4, 2.5], got {ratio:.3f} ({w}x{h}).","messagePattern":"Asset video aspect ratio \\(W/H\\) must be in \\[0\\.4, 2\\.5\\], got (.+?) \\((.+?)x(.+?)\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance.py","lineNumber":3050,"sourceCode":"        )\n\n    @classmethod\n    async def execute(\n        cls,\n        video: Input.Video,\n        group_id: str = \"\",\n        # name: str = \"\",\n    ) -> IO.NodeOutput:\n        # if len(name) > 64:\n        #     raise ValueError(\"Name of asset can not be greater then 64 symbols\")\n        validate_video_duration(video, min_duration=2, max_duration=15)\n        validate_video_dimensions(video, min_width=300, max_width=6000, min_height=300, max_height=6000)\n\n        w, h = video.get_dimensions()\n        if h > 0:\n            ratio = w / h\n            if not (0.4 <= ratio <= 2.5):\n                raise ValueError(f\"Asset video aspect ratio (W/H) must be in [0.4, 2.5], got {ratio:.3f} ({w}x{h}).\")\n        pixels = w * h\n        if not (409_600 <= pixels <= 927_408):\n            raise ValueError(\n                f\"Asset video total pixels (W×H) must be in [409600, 927408], \" f\"got {pixels:,} ({w}x{h}).\"\n            )\n\n        fps = float(video.get_frame_rate())\n        if not (24 <= fps <= 60):\n            raise ValueError(f\"Asset video FPS must be in [24, 60], got {fps:.2f}.\")\n\n        resolved_group = await _resolve_group_id(cls, group_id)\n        asset_id = await _create_seedance_asset(\n            cls,\n            group_id=resolved_group,\n            url=await upload_video_to_comfyapi(cls, video),\n            name=\"\",\n            asset_type=\"Video\",\n        )","sourceCodeStart":3032,"sourceCodeEnd":3068,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance.py#L3032-L3068","documentation":"The Create Seedance Asset video node validates uploaded reference assets against BytePlus asset constraints: aspect ratio W/H must lie in [0.4, 2.5] (portrait 2:5 to landscape 5:2). The check runs after validate_video_duration/dimensions and before upload, so nothing is transmitted for an out-of-range ratio.","triggerScenarios":"Uploading an extreme aspect-ratio video (e.g. 9:16 is fine at 0.5625, but a 1:3 vertical slice at 0.333 or a 3:1 panorama at 3.0 fails) to the video asset creation node.","commonSituations":"Cinemascope strips, tall phone-cropped slices, or letterboxed exports whose actual pixel ratio falls outside the band.","solutions":["Crop or pad the video so W/H is between 0.4 and 2.5 (e.g. pad a 3:1 strip vertically).","Pick a different source clip whose framing already fits the band."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"w, h = video.get_dimensions()\nif h > 0 and not (0.4 <= w / h <= 2.5):\n    raise ValueError(\"crop or pad to bring W/H into [0.4, 2.5]\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid extreme panoramas and ultra-tall crops in asset videos.","Pad out-of-band ratios with black bars to re-enter [0.4, 2.5]."],"tags":["bytedance","seedance","asset","video","aspect-ratio","validation"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}