(
cls,
image: Input.Image,
group_id: str = "",
# name: str = "",
)
| 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 | |
| 2394 | class ByteDanceCreateVideoAsset(IO.ComfyNode): |
nothing calls this directly
no test coverage detected