Comments (6)
Hmmm. I'm honestly a little conflicted. The Any Switch was really built to be used with muting. So, if you didn't want an empty string to be chosen, you would mute that node.
It is true that I added support for an empty Context being skipped if passed in (at least for the Context Switch, not sure if it works that way for the Any Switch if using Contexts). But I worry a bit about changing the behavior here, especially now that it's been out for so long...
While empty string may seem to make sense, I could see someone who uses an empty string as the last value so it always passes a valid string if others a muted. I could also think this opens the question up to empty lists being ignored, or a 0 number, etc.
For now, I think I'm erring on the side of not changing the existing behavior and having it rely on muting as the primary switching.
from rgthree-comfy.
8c92a8a adds support for dynamic number of inputs to Any Switch!
from rgthree-comfy.
Oh, I also meant to mention: With the recent commit 45781c3, Context Switch nodes now support a dynamic number of inputs. That's a nice upgrade!
This would also be a very useful feature for the Any Switch node. I think that's the only way the current node can still be improved, if it started with just two inputs and then added/removed inputs dynamically as needed.
from rgthree-comfy.
Separately, dynamic inputs for the any switch should be easy. Good idea
from rgthree-comfy.
Hmmm. I'm honestly a little conflicted. The Any Switch was really built to be used with muting. So, if you didn't want an empty string to be chosen, you would mute that node.
It is true that I added support for an empty Context being skipped if passed in (at least for the Context Switch, not sure if it works that way for the Any Switch if using Contexts). But I worry a bit about changing the behavior here, especially now that it's been out for so long...
While empty string may seem to make sense, I could see someone who uses an empty string as the last value so it always passes a valid string if others a muted. I could also think this opens the question up to empty lists being ignored, or a 0 number, etc.
For now, I think I'm erring on the side of not changing the existing behavior and having it rely on muting as the primary switching.
That makes sense and it's probably what I would do as well, considering the node has been out for a while and this change would break backwards compatibility.
Thank you for implementing dynamic number of inputs!
from rgthree-comfy.
I think this is worth documenting here, in case it's useful to someone in the future:
With the dynamic number of inputs feature, the Any Switch node now prunes its inputs whenever any connections are changed. When determining whether an input should be pruned, the node checks if that input has a link:
If like me, you use the Any Switch extensively with "virtual" links such as those created by Anything Everywhere, that will cause those inputs to be dropped. You'll need to add an extra condition or two at the line above.
from rgthree-comfy.
Related Issues (20)
- After the update, there's something on top blocking me. HOT 4
- Copy/paste of nodes stopped working. HOT 1
- [Feature Request] Reroute (rgthree) node
- Feature Request: Fast Group Muter / Bypasser output an optional Int HOT 1
- Bug: FlexibleOptionalInputType is breaking "object_info" API HOT 1
- Lora Loader Request
- KSampler Config not compatible with SamplerCustom HOT 2
- Bookmarks now broken in two important ways HOT 1
- Can Boolean button be converted to input, so that the triggering rules can be customized HOT 7
- .git file is very large (170Mb+) - Requesting cleanup HOT 1
- Error occurred when executing VHS_LoadVideoPath: video is not a valid path: .\ComfyUI\Output\Projects\video\video.mp4 HOT 1
- [Feature Request] Programmatic Fast Bypasser HOT 2
- [Bug]: Context Big problems with the new ComfyUI frontend HOT 1
- [Feature Request] Node triggered bookmark
- [bug] civitai problem with power lora loader (rg3) node HOT 1
- Mute/Bypass Repeater Daisy Chain HOT 1
- Power Lora Loader string output? HOT 1
- IndexError: list index out of range
- Seed node to noise
- [FEATURE REQUEST] Turn ON toggle green when activated in Fast Groups Muter/Bypasser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rgthree-comfy.