ComfyUI Node Runs on cloud

Floor

DF_Floor – ComfyUI Node from Derfuu_ComfyUI_ModdedNodes

By Derfuu·Created 3 years ago·Updated 2 years ago· 455
Floor
    • INT
    Value1.00

    DF_Floor is the "round down" half of a pair - its sibling DF_Ceil rounds up, this one rounds down, and together they're how Derfuu_ComfyUI_ModdedNodes bridges the gap between a float you just calculated and an integer some other node actually wants. Straight from the pack's own docs: 1.99 becomes 1, not 2. The whole number never gets bumped up, no matter how close the fraction is.

    Derfuu_ComfyUI_ModdedNodes itself is a math-and-utility pack that's been around since ComfyUI's early 2023 days - Sum, Subtract, Divide, trig functions, string helpers, and converters like this one, all built as separate single-purpose nodes rather than one all-in-one expression evaluator. Most of the math nodes in the pack output FLOAT, but a lot of what you'd wire that result into - width and height widgets, a step count, a pixel offset - wants a whole number. DF_Floor is the converter for when you specifically want the conservative rounding direction: never overshoot, always land at or under the computed value.

    Input and output

    Just one required input:

    • Value - the FLOAT you want rounded down

    And one output:

    • INT - the floor of Value

    The choice between this and DF_Ceil comes down to which kind of error you'd rather risk. If overshooting a computed dimension would push you past a memory or canvas limit, floor is the safer pick - you might end up a fraction under your target, but never over it. If undershooting means missing coverage (like a scaled crop that needs to at least cover the full frame), reach for Ceil instead.

    Where it fits

    Like its sibling, this is plumbing rather than a destination node. It shows up at the tail end of a scaling calculation - you've multiplied a base size by a ratio, gotten a float, and now need a clean integer before it goes into something like a latent size widget or an image resize. If your graph doesn't do custom arithmetic on dimensions, you won't run into this node at all; ComfyUI's own built-ins already output integers where integers are expected.

    Installing

    The whole pack installs together - there's no way to pull a single node from it. Through ComfyUI Manager: search Derfuu_ComfyUI_ModdedNodes, install, restart ComfyUI. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes
    

    then restart. Pure Python logic, no models to download, no unusual dependencies - the install itself is quick and low-risk.

    Troubleshooting

    If DF_Floor doesn't show up in the node menu right after install, restart the server and then hard-refresh your browser tab - that's the standard fix for a node that loaded fine in the console but isn't rendering in the frontend, and it's a generic ComfyUI quirk rather than anything Derfuu-specific.

    Worth knowing about this pack in general: its maintainer has, in the past, removed deprecated nodes outright between updates rather than keeping a legacy-labeled version around, and long-time users of the pack have specifically flagged that as bad practice. The basic converters - Floor, Ceil, Absolute value - have been stable fixtures for a long time and aren't the ones that have historically been pruned, but it's worth knowing the pattern exists if you're building something you plan to keep running for years: if an old workflow suddenly throws a missing-node error after a pack update, check the GitHub repo for a rename before assuming your setup itself is broken.

    CategoryDerfuu_Nodes/Functions/Converters

    Inputs (1)

    NameTypeDefaultDescription
    ValueFLOAT1.00

    Outputs (1)

    NameTypeDescription
    INTINT