Comfy-Org / Comfy-Org/ComfyUI_frontend
PrimitiveInt / PrimitiveFloat min, max, and step properties are invisible in the UI
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Prerequisites
- [x] I am running the latest version of ComfyUI
- [x] 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 #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
```javascript
```
### Logs
```shell
```
### Additional Context
_No response_
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11847-PrimitiveInt-PrimitiveFloat-min-max-and-step-properties-are-invisible-in-the-UI-3546d73d36508199bc07c113b02e5295) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.