{"record":{"id":"949c7c225d828106","repo":"Comfy-Org/ComfyUI","slug":"reference-asset-i-id-asset-id-is-not-active","errorCode":null,"errorMessage":"Reference asset {i} (Id={asset_id}) is not Active (Status={result.status}).{extra}","messagePattern":"Reference asset (.+?) \\(Id=(.+?)\\) is not Active \\(Status=(.+?)\\)\\.(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance.py","lineNumber":224,"sourceCode":"    \"\"\"Look up each asset, validate Active status, group by asset_type.\n\n    Returns (image_assets, video_assets, audio_assets), each mapping asset_id -> \"asset://<asset_id>\".\n    \"\"\"\n    image_assets: dict[str, str] = {}\n    video_assets: dict[str, str] = {}\n    audio_assets: dict[str, str] = {}\n    for i, raw_id in enumerate(asset_ids, 1):\n        asset_id = (raw_id or \"\").strip()\n        if not asset_id:\n            continue\n        result = await sync_op(\n            cls,\n            ApiEndpoint(path=f\"/proxy/seedance/assets/{asset_id}\"),\n            response_model=GetAssetResponse,\n        )\n        if result.status != \"Active\":\n            extra = f\" {result.error.code}: {result.error.message}\" if result.error else \"\"\n            raise ValueError(f\"Reference asset {i} (Id={asset_id}) is not Active (Status={result.status}).{extra}\")\n        asset_uri = f\"asset://{asset_id}\"\n        if result.asset_type == \"Image\":\n            image_assets[asset_id] = asset_uri\n        elif result.asset_type == \"Video\":\n            video_assets[asset_id] = asset_uri\n        elif result.asset_type == \"Audio\":\n            audio_assets[asset_id] = asset_uri\n    return image_assets, video_assets, audio_assets\n\n\n_ASSET_REF_RE = re.compile(r\"\\basset ?(\\d{1,2})\\b\", re.IGNORECASE)\n\n\ndef _build_asset_labels(\n    reference_assets: dict[str, str],\n    image_asset_uris: dict[str, str],\n    video_asset_uris: dict[str, str],\n    audio_asset_uris: dict[str, str],","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance.py#L206-L242","documentation":"Seedance reference assets are uploaded out-of-band and polled via /proxy/seedance/assets/{id}. Only status 'Active' assets are usable; any other status (e.g. 'Failed', 'Pending', 'Error') raises, appending the API's error code/message when present.","triggerScenarios":"An asset_ids entry resolves to an asset whose GetAssetResponse.status != 'Active' - upload failed, moderation rejected it, or polling raced ahead of processing.","commonSituations":"Reusing stale asset ids from a previous session; content moderation rejected the upload; network hiccup during upload left the asset in a failed state.","solutions":["Re-upload the asset and use the fresh asset id.","Inspect the appended error code/message to see if moderation or format caused the non-Active status and fix the source file.","Blank/whitespace-only ids are skipped - make sure you did not paste a truncated id that maps to someone else's or a dead asset."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"status = await get_asset_status(asset_id)\nif status != 'Active':\n    asset_id = await reupload_asset(source_file)  # fresh id","typeGuard":null,"tryCatchPattern":"try:\n    assets = await collect_active_assets(cls, asset_ids)\nexcept ValueError as e:\n    if 'not Active' in str(e):\n        asset_ids = await reupload_all(sources)  # one retry with fresh uploads\n        assets = await collect_active_assets(cls, asset_ids)\n    else:\n        raise","preventionTips":["Upload references fresh in the same session that consumes them.","Treat any non-Active status as a failed upload: re-upload rather than reusing the id."],"tags":["comfyui","seedance","bytedance","asset","status","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}