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

Method ordered_callbacks

modules/scripts.py:805–815  ·  view source on GitHub ↗
(self, method_name, *, enable_user_sort=True)

Source from the content-addressed store, hash-verified

803 return script_callbacks.sort_callbacks(category, callbacks, enable_user_sort=enable_user_sort)
804
805 def ordered_callbacks(self, method_name, *, enable_user_sort=True):
806 script_list = self.list_scripts_for_method(method_name)
807 category = f'script_{method_name}'
808
809 scrpts_len, callbacks = self.callback_map.get(category, (-1, None))
810
811 if callbacks is None or scrpts_len != len(script_list):
812 callbacks = self.create_ordered_callbacks_list(method_name, enable_user_sort=enable_user_sort)
813 self.callback_map[category] = len(script_list), callbacks
814
815 return callbacks
816
817 def ordered_scripts(self, method_name):
818 return [x.callback for x in self.ordered_callbacks(method_name)]

Callers 2

ordered_scriptsMethod · 0.95
callbacks_order_settingsFunction · 0.80

Calls 2

Tested by

no test coverage detected