Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Blender style sliders ( with min/max as node properties ) #193

Open
1 task done
JorgeR81 opened this issue Oct 7, 2024 · 4 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@JorgeR81
Copy link

JorgeR81 commented Oct 7, 2024

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What would your feature do ?

Users could set min / max values for widgets, in the node properties.
This would allow creating sliders, instead of the current widgets.

https://github.com/florestefano1975/comfyui-portrait-master

sliders


I love the way Blender integrates the slider and input box.

https://forum.qt.io/topic/145406/best-practices-factoring-code-to-create-a-custom-slider

EQxb4

Proposed workflow

Sliders could be enabled, per widget, in the node properties, once the min / max values were inserted.

Some common nodes like KSampler could have pre-filled min / max values.

Additional information

No response

@JorgeR81 JorgeR81 added the enhancement New feature or request label Oct 7, 2024
@huchenlei huchenlei transferred this issue from Comfy-Org/ComfyUI_frontend Oct 7, 2024
@OneMonkeyArmy
Copy link

OneMonkeyArmy commented Oct 20, 2024

FYI... I just tested it, and this is already in available in comfyUI... because this functionality is just not used in any nodes...

all you have to do is find the node to modify...

image

then find the python file that manage it ...

find the "def INPUT_TYPES" section

then find the widget value(s) to be transformed into a slider (in my example, the 2 values are "rows" and "cols"

            "rows": ("INT", { "default": 5, }),
            "cols": ("INT", { "default": 5, }),

make sure you have a default, a min and a max value defined,

            "rows": ("INT", { "default": 1, "min": 1, "max": 64, }),
            "cols": ("INT", { "default": 1, "min": 1, "max": 64, }),

then just add "display": "slider", after the max value....

            "rows": ("INT", { "default": 1, "min": 1, "max": 64, "display": "slider", }),
            "cols": ("INT", { "default": 1, "min": 1, "max": 64, "display": "slider", }),

save the file... restart ComfyUI

and try the node... Sliders as requested !!!

image

@OneMonkeyArmy
Copy link

If it is a custom node from you, it is without any problem...
if it is a node, that will eventually get updated, you will lose your mod... and will have to do it again...

unless someone have a solution....

@JorgeR81
Copy link
Author

JorgeR81 commented Oct 20, 2024

FYI... I just tested it, and this is already in available in comfyUI... because this functionality is just not used in any nodes...

all you have to do is find the node to modify...

make sure you have a default, a min and a max value defined,

What may be missing for this to be added is a slider edit system.
Because you're going to need that, if you allow any widget to be a slider.

Take a look at these extensions:


This custom node allows you to control any numeric widget via slider ( https://github.com/cubiq/ComfyUI_essentials )
And it has the slider settings, in the node itself.

dn


This new extension allows you to reproduce nodes in the Sidebar ( https://github.com/chrisgoringe/cg-controller )
And all numeric widgets have sliders.

The slider editing, it's very simple at the moment. It's in the settings.
The best way to make a change, it's just to copy your slider settings to a text editor.
Hopefully this could be improved in the future ( chrisgoringe/cg-controller#61 )

se

controller

@JorgeR81
Copy link
Author

The cg-controller just added an improved slider edit system.
https://github.com/chrisgoringe/cg-controller

Maybe ComfyUI could have use something similar. 

sedit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants