Skip to content

PrimitiveInt / PrimitiveFloat min, max, and step properties are invisible in the UI #11847

@MagnificentPenguin

Description

@MagnificentPenguin

Prerequisites

  • I am running the latest version of ComfyUI
  • I have custom nodes enabled

What happened?

In PR #7768 ("Frontend code for custom number nodes"), the ability to set min, max, step, and precision was added to PrimitiveInt and PrimitiveFloat nodes. The PR description notes that these options "are no longer exposed as widgets, but set as properties on the node."

However, these properties are never actually initialized with default values in the node's this.properties object upon node creation.

Because they start out as undefined, LiteGraph does not know they exist. Consequently, they are completely invisible in the UI:

  • In the classic/legacy LiteGraph UI, right-clicking the node and selecting "Properties" only shows Title, Mode, Color, etc., but omits the number limits.
  • In the new V1 Vue UI, the "Settings" tab in the Properties Panel also omits them (and there is also no Properties panel in the right-click context menu).

Currently, the only way a user can actually set these limits is by manually editing the workflow .json file in a text editor to inject "min", "max", etc., into the node's properties block. Once manually added to the JSON, they appear in the legacy properties panel UI (but not in Vue) and function properly.

Steps to Reproduce

  1. Open ComfyUI on the latest frontend version (where PR Frontend code for custom number nodes #7768 is merged).
  2. Create a PrimitiveFloat or PrimitiveInt node (e.g., by converting a float widget to an input and dragging it out to a primitive).
  3. Attempt to set the min, max, or step of this node:
    • In the new Vue V1 UI, open the Properties Panel and check the "Settings" tab.
    • Alternatively, switch to the legacy UI, right-click the node, and select "Properties".
  4. Notice that min, max, step are completely missing from the list of editable properties.
  5. (Optional verification): Save the workflow, manually add "min": 2.0 to the primitive node's properties in the JSON file, and load it back. Notice that the field now magically appears in the legacy UI and works as intended.

How is this affecting you?

Feature doesn't work as expected

ComfyUI Frontend Version

1.42.15

Browser

Chrome/Chromium

Console Errors

Logs

Additional Context

No response

┆Issue is synchronized with this Notion page by Unito

Metadata

Metadata

Assignees

No one assigned

    Labels

    Potential BugUntriaged bugarea:uiGeneral user interface and experience improvements

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions