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

Document solution to.... UE for list-select widgets converted to inputs.... (Method to apply Anything to various inputs?) #69

Closed
alenknight opened this issue Dec 4, 2023 · 21 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@alenknight
Copy link

maybe an enhancement suggestion...as i couldn't find any prior issue directly addressing this (though i see something similar often repeated )... say i want to set scheduler to be global.
I go to my ksamplers, set scheduler to be "input"
then when i use the everything/anywhere node.... i'd like that to affect all the schedulers that have input

is this possible? or is it part of that issue where you mentioned recently that reroute nodes are difficult?

@chrisgoringe
Copy link
Owner

Currently not possible. It's not quite like the reroute nodes, but it's not totally separate either. Anything that is a dropdown has a weird data type.

Renaming this to remind me to think about it more....

@chrisgoringe chrisgoringe added the enhancement New feature or request label Dec 4, 2023
@chrisgoringe chrisgoringe changed the title Method to apply Anything to various inputs? UE for list-select widgets converted to inputs.... (Method to apply Anything to various inputs?) Dec 4, 2023
@DrJKL
Copy link

DrJKL commented Dec 4, 2023

I think this was the issue, right? #52

@Lex-DRL
Copy link

Lex-DRL commented Dec 8, 2023

So, what's the solution? I'd like to have both sampler and scheduler set in one place.
That issue is closed, but I still can't connect a primitive to either Anything Everywhere or Anything Everywhere?.

@chrisgoringe
Copy link
Owner

This issue is open.

@Lex-DRL
Copy link

Lex-DRL commented Dec 8, 2023

As a quick solution - maybe, for now, just add statically-typed Sampler everywhere and Scheduler Everywhere nodes?
This should cover 90% of leftover spaghetti (especially when used with Set/Get from KJNodes). Most other list-type inputs are related to model selection, and when they're used, you better off passing the loaded model itself anyway. Which, as an output, is statically-typed, too.

@DrJKL
Copy link

DrJKL commented Dec 8, 2023

UE_sampler_control_example.json
UE_sampler_control_example

I think I found another way to do it for now.

CustomSampler, provide the sampler and sigmas via UE.

@Lex-DRL
Copy link

Lex-DRL commented Dec 8, 2023

It's nice... but it basically makes any other sampling nodes incompatible with UE. Like, effeciency pack, impact pack or similar.

@DrJKL
Copy link

DrJKL commented Dec 8, 2023

I wonder if they could change their widget/input to be compatible with the built-in Sampler/Sigma providers

@Lex-DRL
Copy link

Lex-DRL commented Dec 8, 2023

Ooops... my bad. I didn't know there already exists a KSamplerSelect node. And I just discovered that I already have a node to choose a scheduler. It's a part of comfy-image-saver.

... However, Anything Everywhere ? doesn't seem to work with the bundled KSamplerSelect:
Screenshot

@Lex-DRL
Copy link

Lex-DRL commented Dec 8, 2023

Oddly enough, it does work with the node from image-saver.

@DrJKL
Copy link

DrJKL commented Dec 8, 2023

I think the KSampler expects a string but KSamplerSelect provides a SAMPLER

@Lex-DRL
Copy link

Lex-DRL commented Dec 8, 2023

Great. I have a solution for now, with no need to create any custom nodes. Anything Everywhere? from your repo + Sampler Selector / Scheduler Selector from the aforementioned image-saver repo.

And since there is already a node for that, I don't think you need to add your own doing the same thing. Though, you might want to add this workflow suggestion to readme.

@alenknight
Copy link
Author

good move with the sampler/scheduler selectors. I'll start incorporating them in my workflows

@chrisgoringe chrisgoringe added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Dec 18, 2023
@chrisgoringe chrisgoringe changed the title UE for list-select widgets converted to inputs.... (Method to apply Anything to various inputs?) Document solution to.... UE for list-select widgets converted to inputs.... (Method to apply Anything to various inputs?) Dec 18, 2023
@alexopus
Copy link

alexopus commented Dec 25, 2023

It's nice... but it basically makes any other sampling nodes incompatible with UE. Like, effeciency pack, impact pack or similar.

+1.
While the solution with KSamplerSelect & BasicScheduler to SamplerCustom works for regular KSampler, it would nice to have a more general one to support any kind of sampler. To name a few: KSampler (inspire), Ultimate SD Upscale, FaceDetailer, Tiled KSampler...

The difference between KSamplerSelect and Sampler Selector from image-saver seems to be the type:
https://github.com/comfyanonymous/ComfyUI/blob/master/comfy_extras/nodes_custom_sampler.py#L164
https://github.com/giriss/comfy-image-saver/blob/main/nodes.py#L150
Where the latter matches the the type from USDU, inspire & co: https://github.com/ltdrdata/ComfyUI-Inspire-Pack/blob/main/inspire/a1111_compat.py#L55 and KSamplerSelect does not.

@alexopus
Copy link

For reference, there is now a way to control sampler/scheduler globally in the inspire pack: ltdrdata/ComfyUI-Inspire-Pack@fb7ebc7#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5

@chrisgoringe
Copy link
Owner

Or do with #91

@Latentnaut
Copy link

Great. I have a solution for now, with no need to create any custom nodes. Anything Everywhere? from your repo + Sampler Selector / Scheduler Selector from the aforementioned image-saver repo.

And since there is already a node for that, I don't think you need to add your own doing the same thing. Though, you might want to add this workflow suggestion to readme.

This is working for me too :)

Please keep posting new findings. Good job!

@chrisgoringe
Copy link
Owner

Closing this - but I've referenced it in the docs. Thanks to those who worked out solutions!

Regarding working with third party samplers - I'd be encouraging their authors to make them work with the built in Sampler and Sigma types...

@JorgeR81
Copy link

You can also use the KSampler Config (rgthree) node, which has COMBO widgets for sampler and scheduler.
And you can even group it with "float" nodes from Impact pack, to add extra KSampler parameters, like denoise. 
This works with the "vanilla" KSampler !

rg3k

rg3

@JorgeR81
Copy link

And it also works with samplers from other node packs, like FaceDetailer ( Impact Pack )

dfet

@JorgeR81
Copy link

JorgeR81 commented Mar 29, 2024

There is also a workaround, with the CR String To Combo node from ComfyUI_Comfyroll_CustomNodes.
This should work for any cases ( e.g. preprocessor selector ).
But we need to use the Simple String node for the UE? node input, so no dropdown list.

Fannovel16/comfyui_controlnet_aux#289 (comment)

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

No branches or pull requests

7 participants