MCPcopy Create free account
hub / github.com/Comfy-Org/ComfyUI / execute

Method execute

comfy_api_nodes/nodes_bytedance.py:2367–2391  ·  view source on GitHub ↗
(
        cls,
        image: Input.Image,
        group_id: str = "",
        # name: str = "",
    )

Source from the content-addressed store, hash-verified

2365
2366 @classmethod
2367 async def execute(
2368 cls,
2369 image: Input.Image,
2370 group_id: str = "",
2371 # name: str = "",
2372 ) -> IO.NodeOutput:
2373 # if len(name) > 64:
2374 # raise ValueError("Name of asset can not be greater then 64 symbols")
2375 validate_image_dimensions(image, min_width=300, max_width=6000, min_height=300, max_height=6000)
2376 validate_image_aspect_ratio(image, min_ratio=(0.4, 1), max_ratio=(2.5, 1))
2377 resolved_group = await _resolve_group_id(cls, group_id)
2378 asset_id = await _create_seedance_asset(
2379 cls,
2380 group_id=resolved_group,
2381 url=await upload_image_to_comfyapi(cls, image),
2382 name="",
2383 asset_type="Image",
2384 )
2385 await _wait_for_asset_active(cls, asset_id, resolved_group)
2386 PromptServer.instance.send_progress_text(
2387 f"Please save the asset_id and group_id for reuse.\n\nasset_id: {asset_id}\n\n"
2388 f"group_id: {resolved_group}",
2389 cls.hidden.unique_id,
2390 )
2391 return IO.NodeOutput(asset_id, resolved_group)
2392
2393
2394class ByteDanceCreateVideoAsset(IO.ComfyNode):

Callers

nothing calls this directly

Calls 7

upload_image_to_comfyapiFunction · 0.90
_resolve_group_idFunction · 0.85
_create_seedance_assetFunction · 0.85
_wait_for_asset_activeFunction · 0.85
send_progress_textMethod · 0.80

Tested by

no test coverage detected