-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
rework set_named_arg #14773
rework set_named_arg #14773
Conversation
change identifying a script from using Scripts class name to Scripts internal name an as not all Script have unique names raise RuntimeError when there's issue
The reason for |
I forgot to copy the reasoning behind using tldr is that using unless you want to add extra logic like if no match if found with the tab prefix issue is also in part why I wanted to add |
we can add an argument |
Yeah, let's do that. |
done |
31e4b2e
to
eae0bb8
Compare
change identifying a script from using Scripts class name to Scripts internal name an as not all Script have unique names
raise RuntimeError when there's issue
reason the identifying a script using
class name
is problematic as currently as there's no convention to using unique names with thereScript class name
in base webui alone we have multiple scripts that are all called Scripts
not to mention lots of extensions use the same Script name for the Script
hence the change to using the scrip internal
name
using
==
to matchelem_id
and as opposed to returning none when there is an issue like script or element id is not found, raise runtime error
even though comparing the element ID using
in
is convenient as it allows you to ignore stuff like the prefixtxt2img_
intxt2img_seed
but this would cause a potential issue in that depending on the order of your argfor example if you have two elements args with IDs of
seed
andsubseed
if the order of the args is
['seed', 'subseed']
then everything function as normalbut if the order is
['subseed', 'seed']
when matching forseed
it be match withsubseed
hence changed to using
==
Checklist: