ComfyUI Custom Node Builder
ConstantineB6/comfy-pilot
Helps an agent write ComfyUI custom nodes in Python, including wrapping an existing script, mapping data types and handling image batches.
Lists ComfyUI node data types, from IMAGE, MASK and LATENT tensors to model types, with their V3 classes and formats.
$ npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jtydhr88/comfyui-custom-node-skills comfyui-node-datatypes --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jtydhr88/comfyui-custom-node-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes .claude/skills/comfyui-node-datatypes && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "comfyui-node-datatypes" agent skill from https://github.com/jtydhr88/comfyui-custom-node-skills/tree/master/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes into .claude/skills/comfyui-node-datatypes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-node-datatypes", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jtydhr88/comfyui-custom-node-skills/tree/master/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jtydhr88/comfyui-custom-node-skills comfyui-node-datatypes --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jtydhr88/comfyui-custom-node-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes .agents/skills/comfyui-node-datatypes && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "comfyui-node-datatypes" agent skill from https://github.com/jtydhr88/comfyui-custom-node-skills/tree/master/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes into .agents/skills/comfyui-node-datatypes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-node-datatypes", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jtydhr88/comfyui-custom-node-skills comfyui-node-datatypes --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jtydhr88/comfyui-custom-node-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes .cursor/skills/comfyui-node-datatypes && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "comfyui-node-datatypes" agent skill from https://github.com/jtydhr88/comfyui-custom-node-skills/tree/master/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes into .cursor/skills/comfyui-node-datatypes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-node-datatypes", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jtydhr88/comfyui-custom-node-skills.git --path plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jtydhr88/comfyui-custom-node-skills comfyui-node-datatypes --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jtydhr88/comfyui-custom-node-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes .gemini/skills/comfyui-node-datatypes && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "comfyui-node-datatypes" agent skill from https://github.com/jtydhr88/comfyui-custom-node-skills/tree/master/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes into .gemini/skills/comfyui-node-datatypes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-node-datatypes", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jtydhr88/comfyui-custom-node-skills comfyui-node-datatypesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jtydhr88/comfyui-custom-node-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes .github/skills/comfyui-node-datatypes && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "comfyui-node-datatypes" agent skill from https://github.com/jtydhr88/comfyui-custom-node-skills/tree/master/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes into .github/skills/comfyui-node-datatypes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-node-datatypes", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jtydhr88/comfyui-custom-node-skills comfyui-node-datatypes --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jtydhr88/comfyui-custom-node-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes .opencode/skills/comfyui-node-datatypes && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "comfyui-node-datatypes" agent skill from https://github.com/jtydhr88/comfyui-custom-node-skills/tree/master/plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes into .opencode/skills/comfyui-node-datatypes/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "comfyui-node-datatypes", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
comfyui-node-datatypesLists ComfyUI node data types, from IMAGE, MASK and LATENT tensors to model types, with their V3 classes and formats.
Writing a ComfyUI custom node means choosing the right input and output types, and this reference lays them out. Its tables give each type's V3 class, such as `io.Image` and `io.Latent`, and the format behind it: IMAGE is a float32 `torch.Tensor` in batch, height, width, channel order with values from 0 to 1, MASK is a grayscale tensor, and LATENT is a dictionary holding a `samples` tensor.
Further tables cover audio, video, noise schedules, LoRA weights, motion tracking data and generic dict and list types, then model types such as MODEL, CLIP, VAE, CONTROL_NET and SAMPLER, which are opaque and usually passed straight through. The description adds widget types and custom types. It works as a lookup table to keep open while defining a node's inputs and outputs, not as a tutorial on building one.
Read from SKILL.md and the folder at commit 63a78dc. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
ComfyUI Node Datatypes loads about 4.3k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 887 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jtydhr88/comfyui-custom-node-skills at commit 63a78dc, republished under its MIT licence (© jtydhr88). 887 words, ~4,347 tokens.
.claude/skills/comfyui-node-datatypes/SKILL.md (or your agent's skills folder).ComfyUI uses specific data types for node inputs and outputs. Understanding tensor shapes and data formats is essential.
| Type | V3 Class | Format | Description |
|---|---|---|---|
| IMAGE | io.Image | torch.Tensor [B,H,W,C] float32 0-1 | Batch of RGB images |
| MASK | io.Mask | torch.Tensor [H,W] or [B,H,W] float32 0-1 | Grayscale masks |
| LATENT | io.Latent | {"samples": Tensor[B,C,H,W] or [B,C,T,H,W], "noise_mask"?: Tensor, "batch_index"?: list[int], "type"?: str} | Latent space (4D image / 5D video) |
| CONDITIONING | io.Conditioning | list[tuple[Tensor, PooledDict]] | Text conditioning with pooled outputs |
| AUDIO | io.Audio | {"waveform": Tensor[B,C,T], "sample_rate": int} | Audio data |
| VIDEO | io.Video | VideoInput ABC | Video data (abstract base class) |
| SIGMAS | io.Sigmas | torch.Tensor 1D, length steps+1 | Noise schedule |
| NOISE | io.Noise | Object with generate_noise() | Noise generator |
| LORA_MODEL | io.LoraModel | dict[str, torch.Tensor] | LoRA weight deltas |
| LOSS_MAP | io.LossMap | {"loss": list[torch.Tensor]} | Loss map |
| TRACKS | io.Tracks | {"track_path": Tensor, "track_visibility": Tensor} | Motion tracking data |
| WAN_CAMERA_EMBEDDING | io.WanCameraEmbedding | torch.Tensor | WAN camera embeddings |
| LATENT_OPERATION | io.LatentOperation | Callable[[Tensor], Tensor] | Latent transform function |
| TIMESTEPS_RANGE | io.TimestepsRange | tuple[int, int] | Range 0.0-1.0 |
| DICT | io.Dict | dict | Generic dictionary |
| ARRAY | io.Array | list | Generic list/array |
| Type | V3 Class | Python Type |
|---|---|---|
| MODEL | io.Model | ModelPatcher |
| CLIP | io.Clip | CLIP |
| VAE | io.Vae | VAE |
| CONTROL_NET | io.ControlNet | ControlNet |
| CLIP_VISION | io.ClipVision | ClipVisionModel |
| CLIP_VISION_OUTPUT | io.ClipVisionOutput | ClipVisionOutput |
| STYLE_MODEL | io.StyleModel | StyleModel |
| GLIGEN | io.Gligen | ModelPatcher (wrapping Gligen) |
| UPSCALE_MODEL | io.UpscaleModel | ImageModelDescriptor |
| BACKGROUND_REMOVAL | io.BackgroundRemoval | BackgroundRemovalModel (e.g. BiRefNet) |
| LATENT_UPSCALE_MODEL | io.LatentUpscaleModel | Any |
| SAMPLER | io.Sampler | Sampler |
| GUIDER | io.Guider | CFGGuider |
| HOOKS | io.Hooks | HookGroup |
| HOOK_KEYFRAMES | io.HookKeyframes | HookKeyframeGroup |
| MODEL_PATCH | io.ModelPatch | Any |
| AUDIO_ENCODER | io.AudioEncoder | Any |
| AUDIO_ENCODER_OUTPUT | io.AudioEncoderOutput | Any |
| PHOTOMAKER | io.Photomaker | Any |
| POINT | io.Point | Any |
| FACE_ANALYSIS | io.FaceAnalysis | Any |
| BBOX | io.BBOX | Any |
| SEGS | io.SEGS | Any |
| Type | V3 Class | Python Type | Description |
|---|---|---|---|
| MESH | io.Mesh | MESH(vertices, faces) | 3D mesh with vertices + faces tensors |
| VOXEL | io.Voxel | VOXEL(data) | Voxel data tensor |
| SPLAT | io.Splat | SPLAT | Gaussian splat data |
| FILE_3D | io.File3DAny | File3D | Any supported 3D format |
| FILE_3D_GLB | io.File3DGLB | File3D | Binary glTF |
| FILE_3D_GLTF | io.File3DGLTF | File3D | JSON-based glTF |
| FILE_3D_FBX | io.File3DFBX | File3D | FBX format |
| FILE_3D_OBJ | io.File3DOBJ | File3D | OBJ format |
| FILE_3D_STL | io.File3DSTL | File3D | STL format (3D printing) |
| FILE_3D_USDZ | io.File3DUSDZ | File3D | Apple AR format |
| FILE_3D_PLY | io.File3DPLY | File3D | PLY (point cloud / splat) |
| FILE_3D_SPLAT | io.File3DSPLAT | File3D | .splat gaussian splat file |
| FILE_3D_SPZ | io.File3DSPZ | File3D | Compressed splat (.spz) |
| FILE_3D_KSPLAT | io.File3DKSPLAT | File3D | .ksplat format |
| FILE_3D_SPLAT_ANY | io.File3DSplatAny | File3D | Any splat format |
| FILE_3D_POINT_CLOUD_ANY | io.File3DPointCloudAny | File3D | Any point cloud format |
| SVG | io.SVG | SVG | Scalable vector graphics |
| LOAD_3D | io.Load3D | Model3DDict (see below) | 3D model with renders |
| LOAD_3D_ANIMATION | io.Load3DAnimation | Same as Load3D | Animated 3D model |
| LOAD3D_CAMERA | io.Load3DCamera | CameraInfo (see below) | 3D camera info |
| LOAD3D_MODEL_INFO | io.Load3DModelInfo | list[Model3DTransform] | Per-model transforms (position/quaternion/scale) |
Load3D.Model3DDict: {"image": str, "mask": str, "normal": str, "camera_info": CameraInfo, "recording"?: str, "model_3d_info"?: list[Model3DTransform]}
Load3DCamera.CameraInfo (right-handed, Y-up, camera looks down -Z): required keys position, target, zoom, cameraType ('perspective' | 'orthographic'); optional keys quaternion (camera world rotation), fov (vertical, degrees, perspective only), aspect, near, far, frustum (orthographic only: {left, right, top, bottom}).
Load3DModelInfo.Model3DTransform: {"position": dict, "quaternion": dict, "scale": dict} in world space.
| Type | V3 Class | Python Type | Description |
|---|---|---|---|
| INT | io.Int | int | Integer with min/max/step |
| FLOAT | io.Float | float | Float with min/max/step/round |
| STRING | io.String | str | Text (single/multi-line) |
| BOOLEAN | io.Boolean | bool | Toggle with labels |
| COMBO | io.Combo | str | Dropdown selection |
| COMBO (multi) | io.MultiCombo | list[str] | Multi-select dropdown |
| COLOR | io.Color | str (hex) | Color picker, default #ffffff |
| COLORS | io.Colors | list[str] (hex) | Color palette (list of colors) |
| BOUNDING_BOX | io.BoundingBox | {"x": int, "y": int, "width": int, "height": int} | Rectangle region |
| BOUNDING_BOXES | io.BoundingBoxes | list[{"x", "y", "width", "height", "metadata": dict}] | Multiple labeled regions |
| CURVE | io.Curve | list[tuple[float, float]] | Spline curve points |
| RANGE | io.Range | RangeInput (min/max + optional midpoint) | Levels/range editor with gradient display |
| IMAGECOMPARE | io.ImageCompare | dict | Image comparison widget |
| WEBCAM | io.Webcam | str | Webcam capture widget |
| HISTOGRAM | io.Histogram | list[int] | Histogram bin counts |
| Type | V3 Class | Description |
|---|---|---|
* (ANY) | io.AnyType | Matches any type |
| COMFY_MULTITYPED_V3 | io.MultiType | Accept multiple specific types on one input |
| COMFY_MATCHTYPE_V3 | io.MatchType | Generic type matching across inputs/outputs |
| COMFY_AUTOGROW_V3 | io.Autogrow | Dynamic growing inputs |
| COMFY_DYNAMICCOMBO_V3 | io.DynamicCombo | Combo that reveals sub-inputs per option |
| COMFY_DYNAMICSLOT_V3 | io.DynamicSlot | Connection slot that reveals sub-inputs when connected (not yet used by core nodes) |
| FLOW_CONTROL | io.FlowControl | Internal testing only |
| ACCUMULATION | io.Accumulation | Internal testing only |
Images are torch.Tensor with shape [B, H, W, C]:
import torch
import numpy as np
from PIL import Image as PILImage
class ImageProcessor(io.ComfyNode):
@classmethod
def define_schema(cls):
return io.Schema(
node_id="ImageProcessor",
display_name="Image Processor",
category="image",
inputs=[io.Image.Input("image")],
outputs=[io.Image.Output("IMAGE")],
)
@classmethod
def execute(cls, image):
b, h, w, c = image.shape
result = torch.clamp(image * 1.5, 0.0, 1.0)
return io.NodeOutput(result)from PIL import ImageOps
# Load from file → tensor
def load_image(path):
img = PILImage.open(path)
img = ImageOps.exif_transpose(img) # fix rotation from camera EXIF
if img.mode == "I": # handle 16-bit images
img = img.point(lambda i: i * (1 / 255))
img = img.convert("RGB")
return torch.from_numpy(np.array(img).astype(np.float32) / 255.0).unsqueeze(0)
# Tensor → save to file
def save_image(tensor, path):
if tensor.dim() == 4:
tensor = tensor[0]
PILImage.fromarray(np.clip(255.0 * tensor.cpu().numpy(), 0, 255).astype(np.uint8)).save(path)
# Batch operations
batch = torch.cat([img1, img2], dim=0) # stack into batch
single = image[i] # extract from batch [H,W,C]
single_batch = image.unsqueeze(0) # add batch dim [1,H,W,C]torch.Tensor with shape [H, W] or [B, H, W], values 0.0-1.0.
# Invert mask
inverted = 1.0 - mask
# Mask ↔ Image conversion
alpha = mask.unsqueeze(0).unsqueeze(-1) # [1,H,W,1]
gray_mask = 0.299*img[:,:,:,0] + 0.587*img[:,:,:,1] + 0.114*img[:,:,:,2]
image_from_mask = mask.unsqueeze(-1).repeat(1, 1, 1, 3) # [B,H,W,3]
# Ensure batch dim
if mask.dim() == 2:
mask = mask.unsqueeze(0) # [1, H, W]Dict with typed keys:
class LatentDict(TypedDict):
samples: torch.Tensor # [B, C, H, W] (image) or [B, C, T, H, W] (video) - required
noise_mask: NotRequired[torch.Tensor]
batch_index: NotRequired[list[int]]
type: NotRequired[str] # only for "audio", "hunyuan3dv2"Image models (SD1.5, SDXL, SD3, Flux): 4D [B, C, H, W] — SD1.5/SDXL = 4 channels, SD3/Flux = 16 channels. Latent dimensions are 1/8 of pixel dims.
Video models (Hunyuan Video, Wan, Cosmos, LTX Video, Mochi): 5D [B, C, T, H, W] — T is the temporal (frame) dimension.
samples = latent["samples"]
# Check dimensionality:
if samples.ndim == 5:
B, C, T, H, W = samples.shape # video latent
else:
B, C, H, W = samples.shape # image latent
# Always preserve extra keys when modifying:
result = latent.copy()
result["samples"] = modified_sampleslist[tuple[Tensor, PooledDict]] — a list of (cond_tensor, metadata_dict) pairs.
The PooledDict contains many optional keys for different models:
class PooledDict(TypedDict):
pooled_output: torch.Tensor
control: NotRequired[ControlNet]
area: NotRequired[tuple[int, ...]]
strength: NotRequired[float] # default 1.0
mask: NotRequired[torch.Tensor]
start_percent: NotRequired[float] # 0.0-1.0
end_percent: NotRequired[float] # 0.0-1.0
guidance: NotRequired[float] # Flux-like models
hooks: NotRequired[HookGroup]
# ... many more model-specific keys (SDXL, SVD, WAN, etc.)Combine conditioning: result = cond_a + cond_b (list concatenation).
VideoInput is an abstract base class with methods:
class VideoInput(ABC):
def get_components(self) -> VideoComponents # images tensor + audio + frame_rate
def save_to(self, path, format, codec, metadata, bit_depth=None) # bit_depth: None keeps native depth (8 or 10)
def as_trimmed(self, start_time=None, duration=None, strict_duration=False) -> VideoInput | None
def get_stream_source(self) -> str | BytesIO
def get_dimensions(self) -> tuple[int, int] # (width, height)
def get_duration(self) -> float # seconds
def get_frame_count(self) -> int
def get_frame_rate(self) -> Fraction
def get_container_format(self) -> str
def get_bit_depth(self) -> int # 8 or 10 (default implementation returns 8)10-bit video is supported end-to-end: loaders report get_bit_depth(), and save nodes preserve depth (yuv420p10le for 10-bit h264).
Concrete implementations: VideoFromFile, VideoFromComponents (available via from comfy_api.latest import InputImpl).
from comfy_api.latest import Types
# File3D wraps a 3D file (disk path or BytesIO stream)
file_3d = Types.File3D(source="/path/to/model.glb", file_format="glb")
file_3d.format # "glb"
file_3d.is_disk_backed # True
file_3d.get_data() # BytesIO
file_3d.get_bytes() # raw bytes
file_3d.save_to("/output/model.glb")from comfy_api.latest import Types
mesh = Types.MESH(vertices=torch.tensor(...), faces=torch.tensor(...))
voxel = Types.VOXEL(data=torch.tensor(...))
splat = Types.SPLAT(...) # gaussian splat dataio.Color.Input("color", default="#ff0000", socketless=True)
# Value is a hex string like "#ff0000"io.Colors.Input("palette", default=["#ff0000", "#00ff00"], socketless=True)
# Value is list[str] of hex colorsio.BoundingBox.Input("bbox",
default={"x": 0, "y": 0, "width": 512, "height": 512},
socketless=True,
component="my_component", # optional custom UI component
)
# Value is {"x": int, "y": int, "width": int, "height": int}io.BoundingBoxes.Input("regions", default=[], socketless=True)
# Value is list of {"x": int, "y": int, "width": int, "height": int, "metadata": dict}from comfy_api.input import CurveInput
io.Curve.Input("curve",
default=[(0.0, 0.0), (1.0, 1.0)], # linear
socketless=True,
)
# In execute(), normalize the raw value first:
curve = CurveInput.from_raw(curve)from comfy_api.input import RangeInput
io.Range.Input("levels",
default={"min": 0.0, "max": 1.0},
display=None, # widget visualization mode
gradient_stops=None, # gradient background for the slider
show_midpoint=True, # show gamma midpoint handle
midpoint_scale=None,
value_min=0.0, value_max=1.0, # UI bounds
)
# In execute(), normalize with RangeInput.from_raw(value):
# .min_val, .max_val, .midpoint (gamma = -log2(midpoint), 0.5 = linear)
# .to_lut(size) generates a GIMP-style levels lookup tableio.MultiCombo.Input("tags",
options=["tag1", "tag2", "tag3"],
default=["tag1"],
placeholder="Select tags...",
chip=True, # show as chips
)
# Value is list[str]io.Webcam.Input("webcam_capture")
# Value is str (captured image data)io.ImageCompare.Input("comparison", socketless=True)
# Value is dict# Simple: create inline custom type
MyData = io.Custom("MY_DATA_TYPE")
# Use in inputs/outputs
io.Schema(
inputs=[MyData.Input("data")],
outputs=[MyData.Output("MY_DATA")],
)For custom types with type hints or custom Input/Output classes:
from comfy_api.latest._io import comfytype, ComfyTypeIO
@comfytype(io_type="MY_DATA_TYPE")
class MyData(ComfyTypeIO):
Type = dict[str, Any] # type hint for the data# Accept any single type (always a connection input, no widget)
io.AnyType.Input("anything")
# Accept specific multiple types
io.MultiType.Input("data", types=[io.Image, io.Mask, io.Latent])
# MultiType with widget override (shows widget for first type)
io.MultiType.Input(
io.Float.Input("value", default=1.0),
types=[io.Float, io.Int],
)from comfy_api.latest import (
ComfyExtension, # extension registration
ComfyAPI, # runtime API (progress, node replacement)
io, # all io types (io.Image, io.Schema, io.ComfyNode, etc.)
ui, # UI output helpers (ui.PreviewImage, ui.SavedImages, etc.)
Input, # Input.Image (ImageInput), Input.Audio, Input.Mask, Input.Latent, Input.Video
InputImpl, # InputImpl.VideoFromFile, InputImpl.VideoFromComponents
Types, # Types.MESH, Types.VOXEL, Types.File3D, Types.VideoCodec, etc.
)When checking if a tensor exists, always use is not None instead of truthiness:
# CORRECT
if image is not None:
process(image)
# WRONG — multi-element tensors don't support bool()
if image: # raises RuntimeError
process(image)
# For boolean conditions on tensors, use .all() or .any()
if (mask > 0.5).all():
...# IMAGE [B,H,W,C] → MASK [B,H,W]
mask = 0.299 * image[:,:,:,0] + 0.587 * image[:,:,:,1] + 0.114 * image[:,:,:,2]
# MASK [B,H,W] → IMAGE [B,H,W,C]
image = mask.unsqueeze(-1).repeat(1, 1, 1, 3)
# Resize image tensor
import torch.nn.functional as F
resized = F.interpolate(
image.permute(0, 3, 1, 2), # [B,C,H,W] for interpolate
size=(new_h, new_w), mode='bilinear', align_corners=False
).permute(0, 2, 3, 1) # back to [B,H,W,C]comfyui-node-basics - Node class structure and registrationcomfyui-node-inputs - Input configuration details (widget options)comfyui-node-outputs - Output types and UI outputscomfyui-node-advanced - MatchType, MultiType, Autogrow, DynamicCombo© jtydhr88, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes of jtydhr88/comfyui-custom-node-skills.
Open the folder on GitHubat commit 63a78dc
ComfyUI Node Datatypes next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| ComfyUI Node Datatypes this skilljtydhr88/comfyui-custom-node-skills | 294 | — | ~4.3k | Automated safety check: Pass | MIT | |
| ComfyUI Custom Node BuilderConstantineB6/comfy-pilot | 230 | — | ~897 | Automated safety check: Pass | MIT | |
| Setupguaardvark/guaardvark | 251 | 1 repos | ~1.2k | Automated safety check: Pass | MIT | |
| AI Toolkit Trainerartokun/comfyui-mcp | 793 | — | ~2.7k | Automated safety check: Pass | MIT | |
| Add Comfyui NodeMooshieblob1/MooshieUI | 207 | — | ~936 | Automated safety check: Pass | AGPL-3.0 | |
| Edit Comfy Workflowpeteromallet/VibeComfy | 150 | — | ~2.2k | Automated safety check: Pass | MIT |
ConstantineB6/comfy-pilot
Helps an agent write ComfyUI custom nodes in Python, including wrapping an existing script, mapping data types and handling image batches.
guaardvark/guaardvark
Connect this agent to a running Guaardvark (self-hosted AI studio) and check what it can do right now.
artokun/comfyui-mcp
Train custom LoRAs with ostris AI-Toolkit. An agent skill from artokun/comfyui-mcp.
Mooshieblob1/MooshieUI
Adds a custom ComfyUI Python node to MooshieUI — Python class in mooshienodes.py, Rust required-class registration, and optional workflow template chain hookup.
peteromallet/VibeComfy
Edit an existing VibeComfy or ComfyUI workflow, ready template, recipe, scratchpad, or target graph.
artokun/comfyui-mcp
Pick the right ComfyUI startup flags for VRAM, attention, caching, and speed.
jtydhr88/comfyui-custom-node-skills
Reference for ComfyUI V3 node patterns such as MatchType, MultiType, Autogrow and DynamicCombo, used to build nodes with dynamic inputs and type matching.
jtydhr88/comfyui-custom-node-skills
Explains the V3 API for ComfyUI custom nodes: node classes, schema, inputs and outputs, registration and how it differs from the legacy V1 style.
jtydhr88/comfyui-custom-node-skills
Guide to writing JavaScript extensions for the ComfyUI frontend from custom nodes, covering lifecycle hooks, widgets, sidebar tabs, commands, settings, toasts and dialogs.
jtydhr88/comfyui-custom-node-skills
ComfyUI node input types - INT, FLOAT, STRING, BOOLEAN, COMBO widgets, hidden inputs, optional inputs, lazy inputs, forceinput.
jtydhr88/comfyui-custom-node-skills
ComfyUI node execution lifecycle - caching, fingerprintinputs/ISCHANGED, validateinputs/VALIDATEINPUTS, checklazystatus, execution order.
jtydhr88/comfyui-custom-node-skills
ComfyUI V1 to V3 node migration - converting legacy nodes to the V3 API.
Categories
Lists ComfyUI node data types, from IMAGE, MASK and LATENT tensors to model types, with their V3 classes and formats. Writing a ComfyUI custom node means choosing the right input and output types, and this reference lays them out.Tensor` in batch, height, width, channel order with values from 0 to 1, MASK is a grayscale tensor, and LATENT is a dictionary holding a `samples` tensor.
ComfyUI Node Datatypes fits situations like: choosing the right ComfyUI type for a custom node's input or output; checking the tensor shape and value range of IMAGE, MASK or LATENT; defining a custom type or widget type in a ComfyUI node.
Run `npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a claude-code`. Or copy the skill folder (plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes in jtydhr88/comfyui-custom-node-skills) into .claude/skills/comfyui-node-datatypes in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a codex`. Or copy the skill folder (plugins/comfyui-custom-nodes/skills/comfyui-node-datatypes in jtydhr88/comfyui-custom-node-skills) into .agents/skills/comfyui-node-datatypes in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jtydhr88/comfyui-custom-node-skills --skill comfyui-node-datatypes -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/comfyui-node-datatypes, .gemini/skills/comfyui-node-datatypes, .github/skills/comfyui-node-datatypes and .opencode/skills/comfyui-node-datatypes in your project.
SKILL.md names no scripts, command-line tools or credentials: ComfyUI Node Datatypes is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
ComfyUI Node Datatypes is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.3k tokens (SKILL.md is roughly 17k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with ComfyUI Node Datatypes: ComfyUI Custom Node Builder (ConstantineB6/comfy-pilot, 230 stars), Setup (guaardvark/guaardvark, 251 stars), AI Toolkit Trainer (artokun/comfyui-mcp, 793 stars) and Add Comfyui Node (Mooshieblob1/MooshieUI, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jtydhr88 (a GitHub user) maintains it in jtydhr88/comfyui-custom-node-skills, which has 294 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on July 27, 2026.
Source: jtydhr88/comfyui-custom-node-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.