(self, is_img2img=False, is_control=False)
| 407 | errors.display(e, 'script') |
| 408 | |
| 409 | def initialize_scripts(self, is_img2img=False, is_control=False): |
| 410 | from modules import scripts_auto_postprocessing |
| 411 | |
| 412 | self.scripts.clear() |
| 413 | self.selectable_scripts.clear() |
| 414 | self.alwayson_scripts.clear() |
| 415 | self.titles.clear() |
| 416 | self.alwayson_titles.clear() |
| 417 | self.infotext_fields.clear() |
| 418 | self.paste_field_names.clear() |
| 419 | self.script_load_ctr = 0 |
| 420 | self.is_img2img = is_img2img |
| 421 | self.scripts.clear() |
| 422 | self.alwayson_scripts.clear() |
| 423 | self.selectable_scripts.clear() |
| 424 | self.auto_processing_scripts = scripts_auto_postprocessing.create_auto_preprocessing_script_data() |
| 425 | |
| 426 | try: |
| 427 | sorted_scripts = sorted(scripts_data, key=lambda x: x.script_class().title().lower()) |
| 428 | except Exception: |
| 429 | sorted_scripts = scripts_data |
| 430 | for script_class, path, _basedir, _script_module in sorted_scripts: |
| 431 | self.add_script(script_class, path, is_img2img, is_control) |
| 432 | |
| 433 | try: |
| 434 | sorted_scripts = sorted(self.auto_processing_scripts, key=lambda x: x.script_class().title().lower()) |
| 435 | except Exception: |
| 436 | sorted_scripts = self.auto_processing_scripts |
| 437 | for script_class, path, _basedir, _script_module in sorted_scripts: |
| 438 | self.add_script(script_class, path, is_img2img, is_control) |
| 439 | |
| 440 | def prepare_ui(self): |
| 441 | self.inputs = [None] |
no test coverage detected