Nodes/ComfyUI-WJNodes/Determine Type
ComfyUI Node

Determine Type

Find out what's actually flowing down a wire

By 807502278·Created 2 years ago·Updated 11 months ago· 20
Determine Type
  • data
  • data
  • is select type
  • type name
type_namecomfyui/image

Every ComfyUI user eventually hits a graph that fails with a cryptic type-mismatch error, and no easy way to see what's actually flowing down a given wire. Determine_Type is a debugging node built for exactly that moment: plug anything into it, pick what you think it should be from a long dropdown, and it tells you whether you're right - plus reports back the actual type it detected, as plain text.

It's one of the miscellaneous utility nodes in ComfyUI-WJNodes, a large personal pack from GitHub user 807502278 that covers everything from crop pipelines to video slicing to color filtering. It's not trying to be a polished product - the README calls it "a simple node package that I use myself" - but a type-inspector like this earns its keep in exactly the kind of sprawling, many-custom-nodes graph that ComfyUI users end up building.

How it works

Connect the mystery data to data and choose an expected type from type_name - the dropdown covers a genuinely wide net: image variants (raw 0–255 vs normalized, 3-channel vs 4-channel, batched vs single), tensor primitives (bool/int/float), model components (unet/vae/clip), sampler-adjacent types (conditioning/latent/latent with a noise mask), and Python basics (None, string, list, dict, tuple, and more - 29 choices in total). The node checks whether the incoming data matches your selection and reports both the yes/no answer and what it actually found.

The inputs and outputs that matter

  • type_name - the enum you're testing against (default comfyui/image). This is a long list; scroll it rather than assume the option you want isn't there.
  • data (optional, * type) - whatever you're inspecting. Leaving it disconnected is a valid way to just browse the type list without testing anything.

Outputs: data passed straight through unchanged (so you can leave this node inline in a working graph without breaking anything downstream), is select type (BOOLEAN - did it match?), and type name (STRING - what the node actually detected).

How to install it

Through ComfyUI Manager, search "ComfyUI-WJNodes." Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/807502278/ComfyUI-WJNodes.git

Restart ComfyUI. No models or heavy dependencies needed - this is a pure Python introspection node.

Common issues & troubleshooting

is select type says false but the data looks right. ComfyUI's type system has more granularity than it looks like at first glance - an image that's technically a single frame vs. a batch of one, or a mask stored as 0–255 integers vs. 0–1 floats, can both "look like an image" while failing a strict type check. Read the type name output rather than trusting your assumption; it tells you exactly what the node saw.

Not sure which enum option applies to your data. Since the node passes data straight through, it's cheap to leave it wired inline and just cycle through a few candidate type_name values while watching type name report the ground truth, instead of guessing once and moving on.

Node doesn't error, but also doesn't seem to do anything useful. Remember this node is diagnostic, not corrective - it tells you what type something is, it doesn't convert or fix anything. Once you know the actual type, you still need the right conversion node elsewhere in your graph.

No outside writeups to check against. This is a small utility inside a personal pack with essentially no public discussion - if a specific type classification surprises you, trust the type name output over any assumption, since that's the ground truth for your exact ComfyUI/Python environment.

CategoryWJNode/Other-node

Inputs (2)

NameTypeDefaultDescription
type_nameCOMBOcomfyui/image29 options: comfyui/image, comfyui/image255, comfyui/image4channels, comfyui/image3channels, comfyui/image_bath, comfyui/image_Single, +23
dataopt*

Outputs (3)

NameTypeDescription
data*
is select typeBOOLEAN
type nameSTRING