Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: