{"record":{"id":"3995029e254a26c5","repo":"Comfy-Org/ComfyUI","slug":"asset-aid-is-not-an-image-asset","errorCode":null,"errorMessage":"Asset {aid} is not an Image asset.","messagePattern":"Asset (.+?) is not an Image asset\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance.py","lineNumber":2543,"sourceCode":"            if first_frame is not None:\n                validate_image_aspect_ratio(first_frame, (2, 5), (5, 2), strict=False)  # 0.4 to 2.5\n                validate_image_dimensions(first_frame, min_width=300, min_height=300)\n                target_dims = _seedance2_target_dims(model[\"resolution\"], model[\"ratio\"], first_frame)\n                first_frame = _resize_to_exact(first_frame, *target_dims)\n            if last_frame is not None:\n                validate_image_aspect_ratio(last_frame, (2, 5), (5, 2), strict=False)  # 0.4 to 2.5\n                validate_image_dimensions(last_frame, min_width=300, min_height=300)\n                if target_dims is None:\n                    target_dims = _seedance2_target_dims(model[\"resolution\"], model[\"ratio\"], last_frame)\n                last_frame = _resize_to_exact(last_frame, *target_dims)\n\n        asset_ids_to_resolve = [a for a in (first_frame_asset_id, last_frame_asset_id) if a]\n        image_assets: dict[str, str] = {}\n        if asset_ids_to_resolve:\n            image_assets, _, _ = await _resolve_reference_assets(cls, asset_ids_to_resolve)\n            for aid in asset_ids_to_resolve:\n                if aid not in image_assets:\n                    raise ValueError(f\"Asset {aid} is not an Image asset.\")\n\n        if first_frame_asset_id:\n            first_frame_url = image_assets[first_frame_asset_id]\n        else:\n            first_frame_url = await _seedance_virtual_library_upload_image_asset(\n                cls, first_frame, wait_label=\"Uploading first frame.\"\n            )\n\n        content: list[TaskTextContent | TaskImageContent] = [\n            TaskTextContent(text=model[\"prompt\"]),\n            TaskImageContent(\n                image_url=TaskImageContentUrl(url=first_frame_url),\n                role=\"first_frame\",\n            ),\n        ]\n        if last_frame_asset_id:\n            content.append(\n                TaskImageContent(","sourceCodeStart":2525,"sourceCodeEnd":2561,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance.py#L2525-L2561","documentation":"After _resolve_reference_assets resolves the requested asset ids, the node checks each id maps to an entry in the image-asset dict. If the id exists but resolved as a Video or Audio asset (or otherwise is absent from the image mapping), it is not usable as a first/last frame, so the node raises with the offending id.","triggerScenarios":"Passing a first_frame_asset_id or last_frame_asset_id that refers to an asset created with asset_type=\"Video\" or an audio asset instead of \"Image\" (see the Create Seedance Asset nodes), or an id that failed to resolve into the image category.","commonSituations":"Copy-pasting the wrong asset_id from the progress text printed by an asset upload node; reusing ids from a video-reference workflow in the keyframe node.","solutions":["Re-upload the frame with the image asset node (asset_type Image) and use that asset_id.","Feed the image directly through first_frame/last_frame instead of asset ids.","Verify the id in the Comfy asset library and confirm its type is Image."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"image_assets, _, _ = await _resolve_reference_assets(cls, [aid])\nassert aid in image_assets, f\"{aid} is not an Image asset\"","typeGuard":"def is_image_asset_id(image_assets: dict[str, str], aid: str) -> bool:\n    return aid in image_assets","tryCatchPattern":null,"preventionTips":["Create frames with the image asset node (asset_type Image); video/audio ids are rejected here.","Copy asset ids only from the matching upload node's printed output."],"tags":["bytedance","seedance","asset","validation","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}