βοΈ CR Integer Multiple
Snap a Number to a Valid Dimension Before It Hits Your Sampler
- INT
- show_help
The textbook use for CR Integer Multiple is dimensions. If you've ever computed a width or height from an aspect ratio calculation or an upscale factor and landed on something like 771 instead of a clean number, this node rounds it to the nearest valid multiple - the step that keeps your VAE and sampler from choking on an off-grid resolution.
Why this matters at all. Diffusion models don't accept arbitrary pixel dimensions. SD 1.5 and SDXL need width and height divisible by 8, because that's the VAE's downscale factor into latent space; newer architectures like Flux need dimensions divisible by 64. Feed a sampler a resolution that doesn't line up and you either get an outright error or a silent crop that leaves a sliver of your image missing. This node exists to catch that before it happens: give it an integer and a multiple, and it snaps the integer to the nearest valid step.
How it works. integer is the number you want to snap (a large-range INT widget), and multiple is what it should be divisible by - default 8, the SD 1.5/SDXL case, but you'd set it to 64 for Flux-family models or whatever your architecture actually requires. One thing worth flagging since it's easy to miss: multiple is typed as a FLOAT in the schema, not an INT, even though conceptually it's a step count. That's not a bug on your end - typing 8.0 instead of 8 is completely normal here, just how the field is defined.
Where to put it in your graph. Right before whatever consumes the dimension - an EmptyLatentImage, a resize node, an upscale calculation. If you're chaining it after Comfyroll's own CR Aspect Ratio or CR Image Pipe nodes, this is the node that turns whatever number those produce into something your model will actually accept without complaint.
Inputs and output that matter. integer (the value to snap) and multiple (what it should divide evenly by, default 8). Output is a single INT plus show_help.
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 your generation still errors on a dimension mismatch after routing it through this node, double-check you actually set multiple to match your architecture - 8 for SD 1.5/SDXL, 64 for Flux - rather than leaving it on the default when your model needs something stricter. Beyond that, the usual pack-wide caveat: Comfyroll registers its whole 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. If nodes are missing after install, redo it with a clean git clone.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| integer | INT | 1-18446744073709550000β18446744073709550000 | β |
| multiple | FLOAT | 8.001β18446744073709550000 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| INT | INT | β |
| show_help | STRING | β |