Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ This node pack focuses on **image / video / edit** — see the full **[node cata
| AtlasCloud Gemini Omni Flash Text-to-Video Developer | google/gemini-omni-flash/text-to-video-developer |
| AtlasCloud Gemini Omni Flash Text-to-Video | google/gemini-omni-flash/text-to-video |
| AtlasCloud Gemini Omni Flash Image-to-Video | google/gemini-omni-flash/image-to-video |
| AtlasCloud Cosmos 3 Super Image-to-Video | nvidia/cosmos-3-super/image-to-video |
| AtlasCloud Gemini Omni Flash Reference-to-Video | google/gemini-omni-flash/reference-to-video |
| AtlasCloud Gemini Omni Flash Video Edit | google/gemini-omni-flash/video-edit |
| AtlasCloud Grok Imagine Video Text-to-Video | xai/grok-imagine-video/text-to-video |
Expand Down Expand Up @@ -368,13 +369,17 @@ This node pack focuses on **image / video / edit** — see the full **[node cata
| AtlasCloud Nano Banana Text-to-Image Developer | google/nano-banana/text-to-image-developer |
| AtlasCloud Seedream V5.0 Lite Text-to-Image | bytedance/seedream-v5.0-lite |
| AtlasCloud Seedream V5.0 Lite Sequential Text-to-Image | bytedance/seedream-v5.0-lite/sequential |
| AtlasCloud Seedream V5.0 Pro Text-to-Image | bytedance/seedream-v5.0-pro/text-to-image |
| AtlasCloud Cosmos 3 Super Text-to-Image | nvidia/cosmos-3-super/text-to-image |
| AtlasCloud Seedream V4 Text-to-Image | bytedance/seedream-v4 |
| AtlasCloud Seedream V4 Sequential Text-to-Image | bytedance/seedream-v4/sequential |
| AtlasCloud Seedream V4.5 Text-to-Image | bytedance/seedream-v4.5 |
| AtlasCloud Seedream V4.5 Sequential Text-to-Image | bytedance/seedream-v4.5/sequential |
| AtlasCloud ZImage Turbo Text-to-Image | z-image/turbo |
| AtlasCloud Ideogram V3 Quality Text-to-Image | ideogram-ai/ideogram-v3-quality |
| AtlasCloud Ideogram V3 Turbo Text-to-Image | ideogram-ai/ideogram-v3-turbo |
| AtlasCloud Ideogram V4 Quality Text-to-Image | ideogram/v4/Quality/text-to-image |
| AtlasCloud Ideogram V4 Turbo Text-to-Image | ideogram/v4/turbo/text-to-image |
| AtlasCloud Luma Photon Text-to-Image | luma/photon |
| AtlasCloud Luma Photon Flash Text-to-Image | luma/photon-flash |
| AtlasCloud Recraft V3 Text-to-Image | recraft-ai/recraft-v3 |
Expand Down Expand Up @@ -426,6 +431,7 @@ This node pack focuses on **image / video / edit** — see the full **[node cata
| AtlasCloud Nano Banana 2 Reference-to-Image Developer | google/nano-banana-2/reference-to-image-developer |
| AtlasCloud Seedream V5.0 Lite Edit | bytedance/seedream-v5.0-lite/edit |
| AtlasCloud Seedream V5.0 Lite Edit Sequential | bytedance/seedream-v5.0-lite/edit-sequential |
| AtlasCloud Seedream V5.0 Pro Edit | bytedance/seedream-v5.0-pro/edit |
| AtlasCloud WAN2.6 Image-Edit | alibaba/wan-2.6/image-edit |
| AtlasCloud WAN2.7 Image-Edit | alibaba/wan-2.7/image-edit |
| AtlasCloud WAN2.7 Pro Image-Edit | alibaba/wan-2.7-pro/image-edit |
Expand Down
68 changes: 68 additions & 0 deletions src/atlascloud_comfyui/nodes/image/ideogram_v4_quality_t2i.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
from __future__ import annotations

from typing import Any, Dict, Tuple

from ..auth.atlas_client_node import AtlasClientHandle


class AtlasIdeogramV4QualityTextToImage:
CATEGORY = "AtlasCloud/Image"
FUNCTION = "run"
RETURN_TYPES = ("STRING", "STRING")
RETURN_NAMES = ("image_url", "prediction_id")

@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"atlas_client": ("ATLAS_CLIENT",),
"prompt": ("STRING", {"multiline": True, "tooltip": "Text prompt"}),
"image_size": (
["square_hd", "square", "portrait_3_4", "portrait_9_16", "landscape_4_3", "landscape_16_9"],
{"default": "landscape_16_9", "tooltip": "Output image resolution preset"},
),
"output_format": (["jpeg", "png"], {"default": "jpeg", "tooltip": "Output image file format"}),
},
"optional": {
"randomize_seed": ("BOOLEAN", {"default": True, "tooltip": "开启后每次生成随机结果;关闭后使用下方固定 seed"}),
"seed": ("INT", {"default": 0, "min": 0, "max": 2**31 - 1, "tooltip": "固定 seed(仅在随机开关关闭时生效)"}),
"poll_interval_sec": ("FLOAT", {"default": 2.0, "min": 0.5, "max": 10.0, "tooltip": "Polling interval (seconds)"}),
"timeout_sec": ("INT", {"default": 300, "min": 30, "max": 7200, "tooltip": "Timeout (seconds)"}),
},
}

def run(
self,
atlas_client: AtlasClientHandle,
prompt: str,
image_size: str,
output_format: str,
randomize_seed: bool = True,
seed: int = 0,
poll_interval_sec: float = 2.0,
timeout_sec: int = 300,
) -> Tuple[str, str]:
client = atlas_client.client

payload: Dict[str, Any] = {
"model": "ideogram/v4/Quality/text-to-image",
"prompt": prompt,
"image_size": image_size,
"output_format": output_format,
}

if not randomize_seed:
payload["seed"] = seed

prediction_id = client.generate_image(payload)
result = client.poll_prediction(
prediction_id,
poll_interval_sec=poll_interval_sec,
timeout_sec=float(timeout_sec),
)

outputs = (result.get("data") or {}).get("outputs") or []
if not outputs:
raise RuntimeError(f"No outputs returned for prediction {prediction_id}: {result}")

return (outputs[0], prediction_id)
68 changes: 68 additions & 0 deletions src/atlascloud_comfyui/nodes/image/ideogram_v4_turbo_t2i.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
from __future__ import annotations

from typing import Any, Dict, Tuple

from ..auth.atlas_client_node import AtlasClientHandle


class AtlasIdeogramV4TurboTextToImage:
CATEGORY = "AtlasCloud/Image"
FUNCTION = "run"
RETURN_TYPES = ("STRING", "STRING")
RETURN_NAMES = ("image_url", "prediction_id")

@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"atlas_client": ("ATLAS_CLIENT",),
"prompt": ("STRING", {"multiline": True, "tooltip": "Text prompt"}),
"image_size": (
["square_hd", "square", "portrait_3_4", "portrait_9_16", "landscape_4_3", "landscape_16_9"],
{"default": "landscape_16_9", "tooltip": "Output image resolution preset"},
),
"output_format": (["jpeg", "png"], {"default": "jpeg", "tooltip": "Output image file format"}),
},
"optional": {
"randomize_seed": ("BOOLEAN", {"default": True, "tooltip": "开启后每次生成随机结果;关闭后使用下方固定 seed"}),
"seed": ("INT", {"default": 0, "min": 0, "max": 2**31 - 1, "tooltip": "固定 seed(仅在随机开关关闭时生效)"}),
"poll_interval_sec": ("FLOAT", {"default": 2.0, "min": 0.5, "max": 10.0, "tooltip": "Polling interval (seconds)"}),
"timeout_sec": ("INT", {"default": 300, "min": 30, "max": 7200, "tooltip": "Timeout (seconds)"}),
},
}

def run(
self,
atlas_client: AtlasClientHandle,
prompt: str,
image_size: str,
output_format: str,
randomize_seed: bool = True,
seed: int = 0,
poll_interval_sec: float = 2.0,
timeout_sec: int = 300,
) -> Tuple[str, str]:
client = atlas_client.client

payload: Dict[str, Any] = {
"model": "ideogram/v4/turbo/text-to-image",
"prompt": prompt,
"image_size": image_size,
"output_format": output_format,
}

if not randomize_seed:
payload["seed"] = seed

prediction_id = client.generate_image(payload)
result = client.poll_prediction(
prediction_id,
poll_interval_sec=poll_interval_sec,
timeout_sec=float(timeout_sec),
)

outputs = (result.get("data") or {}).get("outputs") or []
if not outputs:
raise RuntimeError(f"No outputs returned for prediction {prediction_id}: {result}")

return (outputs[0], prediction_id)
82 changes: 82 additions & 0 deletions src/atlascloud_comfyui/nodes/image/nvidia_cosmos_3_super_t2i.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
from __future__ import annotations

from typing import Any, Dict, Tuple

from ..auth.atlas_client_node import AtlasClientHandle


class AtlasCosmos3SuperTextToImage:
CATEGORY = "AtlasCloud/Image"
FUNCTION = "run"
RETURN_TYPES = ("STRING", "STRING")
RETURN_NAMES = ("image_url", "prediction_id")

@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"atlas_client": ("ATLAS_CLIENT",),
"prompt": ("STRING", {"multiline": True, "tooltip": "Text prompt"}),
"image_size": (
["square_hd", "square", "portrait_4_3", "portrait_16_9", "landscape_4_3", "landscape_16_9"],
{"default": "landscape_16_9", "tooltip": "Output image resolution preset"},
),
"output_format": (["jpeg", "png"], {"default": "jpeg", "tooltip": "Output image file format"}),
},
"optional": {
"negative_prompt": ("STRING", {"multiline": True, "default": "", "tooltip": "Negative prompt"}),
"num_inference_steps": ("INT", {"default": 28, "min": 1, "max": 50, "tooltip": "Inference steps"}),
"guidance_scale": ("FLOAT", {"default": 4.0, "min": 1.0, "max": 20.0, "tooltip": "Guidance scale"}),
"randomize_seed": ("BOOLEAN", {"default": True, "tooltip": "开启后每次生成随机结果;关闭后使用下方固定 seed"}),
"seed": ("INT", {"default": 0, "min": 0, "max": 2**31 - 1, "tooltip": "固定 seed(仅在随机开关关闭时生效)"}),
"enable_safety_checker": ("BOOLEAN", {"default": False, "tooltip": "Enable safety checker"}),
"poll_interval_sec": ("FLOAT", {"default": 2.0, "min": 0.5, "max": 10.0, "tooltip": "Polling interval (seconds)"}),
"timeout_sec": ("INT", {"default": 300, "min": 30, "max": 7200, "tooltip": "Timeout (seconds)"}),
},
}

def run(
self,
atlas_client: AtlasClientHandle,
prompt: str,
image_size: str,
output_format: str,
negative_prompt: str = "",
num_inference_steps: int = 28,
guidance_scale: float = 4.0,
randomize_seed: bool = True,
seed: int = 0,
enable_safety_checker: bool = False,
poll_interval_sec: float = 2.0,
timeout_sec: int = 300,
) -> Tuple[str, str]:
client = atlas_client.client

payload: Dict[str, Any] = {
"model": "nvidia/cosmos-3-super/text-to-image",
"prompt": prompt,
"image_size": image_size,
"num_inference_steps": int(num_inference_steps),
"guidance_scale": float(guidance_scale),
"output_format": output_format,
"enable_safety_checker": bool(enable_safety_checker),
}

neg = (negative_prompt or "").strip()
if neg:
payload["negative_prompt"] = neg
if not randomize_seed:
payload["seed"] = seed

prediction_id = client.generate_image(payload)
result = client.poll_prediction(
prediction_id,
poll_interval_sec=poll_interval_sec,
timeout_sec=float(timeout_sec),
)

outputs = (result.get("data") or {}).get("outputs") or []
if not outputs:
raise RuntimeError(f"No outputs returned for prediction {prediction_id}: {result}")

return (outputs[0], prediction_id)
79 changes: 79 additions & 0 deletions src/atlascloud_comfyui/nodes/image/seedream_v50_pro_edit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
from __future__ import annotations

from typing import Any, Dict, List, Tuple

from ..auth.atlas_client_node import AtlasClientHandle


class AtlasSeedreamV50ProEdit:
CATEGORY = "AtlasCloud/Image"
FUNCTION = "run"
RETURN_TYPES = ("STRING", "STRING")
RETURN_NAMES = ("image_url", "prediction_id")

@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"atlas_client": ("ATLAS_CLIENT",),
"images": ("STRING", {"multiline": True, "default": "", "tooltip": "Input image URLs/base64, one per line"}),
"prompt": ("STRING", {"multiline": True, "tooltip": "Edit instruction"}),
"size": (
[
"2048*2048", "2304*1728", "1728*2304", "2720*1530", "1530*2720",
"2496*1664", "1664*2496", "1024*1024", "1536*1536",
"1776*1328", "1328*1776", "2048*1152", "1152*2048",
],
{"default": "2048*2048", "tooltip": "Output image size WIDTH*HEIGHT"},
),
"output_format": (["jpeg", "png"], {"default": "jpeg", "tooltip": "Output image file format"}),
"enable_base64_output": ("BOOLEAN", {"default": False, "tooltip": "Return base64 instead of URL if supported"}),
},
"optional": {
"poll_interval_sec": ("FLOAT", {"default": 2.0, "min": 0.5, "max": 10.0, "tooltip": "Polling interval (seconds)"}),
"timeout_sec": ("INT", {"default": 300, "min": 30, "max": 7200, "tooltip": "Timeout (seconds)"}),
},
}

def run(
self,
atlas_client: AtlasClientHandle,
images: str,
prompt: str,
size: str,
output_format: str,
enable_base64_output: bool,
poll_interval_sec: float = 2.0,
timeout_sec: int = 300,
) -> Tuple[str, str]:
image_list: List[str] = [v.strip() for v in (images or "").splitlines() if v.strip()]
if not image_list:
raise RuntimeError("images is required (1+ lines) for Seedream V5.0 Pro Edit")

p = (prompt or "").strip()
if not p:
raise RuntimeError("prompt is required")

client = atlas_client.client

payload: Dict[str, Any] = {
"model": "bytedance/seedream-v5.0-pro/edit",
"images": image_list,
"prompt": p,
"size": size,
"output_format": output_format,
"enable_base64_output": bool(enable_base64_output),
}

prediction_id = client.generate_image(payload)
result = client.poll_prediction(
prediction_id,
poll_interval_sec=poll_interval_sec,
timeout_sec=float(timeout_sec),
)

outputs = (result.get("data") or {}).get("outputs") or []
if not outputs:
raise RuntimeError(f"No outputs returned for prediction {prediction_id}: {result}")

return (outputs[0], prediction_id)
Loading
Loading