Nodes/Comfyroll Studio/πŸ”’ CR Index
ComfyUI Node Runs on cloud

πŸ”’ CR Index

A Counter Widget With a Debug Switch Built In

By Suzie1Β·Created 3 years agoΒ·Updated 2 years agoΒ· 1,296
πŸ”’ CR Index
    • INT
    • show_help
    β—„index1β–Ί
    β—„print_to_consoleβ–Ύβ–Ί

    CR Index is about as simple as Comfyroll gets: a single integer widget that outputs an INT, plus a toggle to print that value to your console. If you've ever lost track of what number is actually flowing through a batch or loop, this is the node that lets you check without tearing the graph apart.

    How it works. Set index (default 1, 0–10000) and flip print_to_console to Yes or No. With it on, ComfyUI logs the current index value to the terminal every time the node runs - a cheap way to confirm what's actually being fed into whatever this index is driving downstream, without adding a separate debug/preview node to the graph.

    How people actually drive it across runs. On its own this node is just a static number - nothing about it auto-increments. The way you get a counter that advances is a core ComfyUI feature that applies to any integer widget, not something this node implements itself: right-click the index widget and set "control after generate" to Increment (or Decrement, or Randomize), and ComfyUI bumps the value automatically after every queued run. That's the mechanism people mean when they talk about a Comfyroll "index" advancing through a batch - it's ComfyUI's own widget behavior, applied to this node's widget.

    Where it's genuinely useful. Anywhere you're building index-driven logic - feeding a batch position into a list-selection node, a frame counter into an animation-scheduling node, an offset into CR Index Multiply or CR Index Reset further downstream - and want a single, visible place to both hold that number and sanity-check it while you're building the workflow, before you trust it in a long unattended run.

    Inputs and output that matter. index (the value itself) and print_to_console (Yes/No, the debug toggle) - both required. Output is a single INT plus the standard show_help string.

    Install. ComfyUI Manager: search "Comfyroll Studio", install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git, restart. No models needed.

    Troubleshooting. If you flip print_to_console to Yes and see nothing, check that you're actually looking at the terminal running ComfyUI - not the browser console, which is a separate log entirely and a mix-up beginners make constantly with any node that "prints." Beyond that, the pack-wide caveat applies: Comfyroll registers its entire node set from one shared file, and real reports on r/comfyui show a single broken import (Failed to load Graphics nodes / Failed to load Utility nodes) taking every Comfyroll node down at once, including simple ones like this. If nodes are missing after install, a clean git clone fixes it more reliably than debugging pip.

    Category🧩 Comfyroll Studio/πŸ› οΈ Utils/πŸ”’ Index

    Inputs (2)

    NameTypeDefaultDescription
    indexINT10–10000β€”
    print_to_consoleCOMBO2 options: Yes, No

    Outputs (2)

    NameTypeDescription
    INTINTβ€”
    show_helpSTRINGβ€”