From 5f69cd092d3a9b7e415345cafcebab705be4a828 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 31 Dec 2024 09:09:44 -0500 Subject: [PATCH] fix processing with nested calls Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 3 ++- installer.py | 3 ++- modules/processing_class.py | 16 ++++++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d4fcf5e5..c45af644d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -43,7 +43,8 @@ NYE refresh release with quite a few optimizatios and bug fixes... - enable debug logging by default - image width/height calculation when doing img2img - corrections with batch processing - - hires with refiner prompt and batch processing + - hires with refiner prompt and batch processing + - processing with nested calls ## Update for 2024-12-24 diff --git a/installer.py b/installer.py index eb6eb8511..60aab0ddd 100644 --- a/installer.py +++ b/installer.py @@ -54,7 +54,7 @@ git_commit = "unknown" diffusers_commit = "unknown" extensions_commit = { 'sd-webui-controlnet': 'ecd33eb', - 'adetailer': 'a89c01d' + # 'adetailer': 'a89c01d' # 'stable-diffusion-webui-images-browser': '27fe4a7', } @@ -1075,6 +1075,7 @@ def set_environment(): os.environ.setdefault('TF_CPP_MIN_LOG_LEVEL', '2') os.environ.setdefault('TF_ENABLE_ONEDNN_OPTS', '0') os.environ.setdefault('USE_TORCH', '1') + os.environ.setdefault('TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD', '1') os.environ.setdefault('UVICORN_TIMEOUT_KEEP_ALIVE', '60') os.environ.setdefault('KINETO_LOG_LEVEL', '3') os.environ.setdefault('DO_NOT_TRACK', '1') diff --git a/modules/processing_class.py b/modules/processing_class.py index a8ffd3392..96761d262 100644 --- a/modules/processing_class.py +++ b/modules/processing_class.py @@ -116,18 +116,23 @@ class StableDiffusionProcessing: # overrides override_settings: Dict[str, Any] = {}, override_settings_restore_afterwards: bool = True, - task_args: Dict[str, Any] = {}, - ops: List[str] = [], # metadata - extra_generation_params: Dict[Any, Any] = {}, + # extra_generation_params: Dict[Any, Any] = {}, + # task_args: Dict[str, Any] = {}, + # ops: List[str] = [], + **kwargs, ): + for k, v in kwargs.items(): + setattr(self, k, v) + # extra args set by processing loop - self.task_args = task_args + self.task_args = {} + self.extra_generation_params = {} # state items self.state: str = '' - self.ops = ops + self.ops = [] self.skip = [] self.color_corrections = [] self.is_control = False @@ -203,7 +208,6 @@ class StableDiffusionProcessing: self.do_not_save_samples = do_not_save_samples self.do_not_save_grid = do_not_save_grid self.override_settings_restore_afterwards = override_settings_restore_afterwards - self.extra_generation_params = extra_generation_params self.eta = eta self.cfg_scale = cfg_scale self.cfg_end = cfg_end