MCPcopy Index your code
hub / github.com/AUTOMATIC1111/stable-diffusion-webui / before_component

Method before_component

modules/scripts.py:290–298  ·  view source on GitHub ↗

Called before a component is created. Use elem_id/label fields of kwargs to figure out which component it is. This can be useful to inject your own components somewhere in the middle of vanilla UI. You can return created components in the ui() function to add the

(self, component, **kwargs)

Source from the content-addressed store, hash-verified

288 pass
289
290 def before_component(self, component, **kwargs):
291 """
292 Called before a component is created.
293 Use elem_id/label fields of kwargs to figure out which component it is.
294 This can be useful to inject your own components somewhere in the middle of vanilla UI.
295 You can return created components in the ui() function to add them to the list of arguments for your processing functions
296 """
297
298 pass
299
300 def after_component(self, component, **kwargs):
301 """

Callers 3

IOComponent_initFunction · 0.45
BlockContext_initFunction · 0.45
before_componentMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected