From 7461507ecb58141c11639c342c4402557d89724f Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Tue, 7 Jan 2025 11:04:34 -0500 Subject: [PATCH] apply settings skip hidden Signed-off-by: Vladimir Mandic --- CHANGELOG.md | 1 + modules/shared.py | 4 ---- modules/ui.py | 2 ++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5e9a3c7f..0e5d3657c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - scheduler api - controlnet with hires - controlnet with batch count + - apply settings skip hidden settings ## Update for 2024-12-31 diff --git a/modules/shared.py b/modules/shared.py index 015465a4c..5b1d2fd89 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -1078,7 +1078,6 @@ def save_atomic(self, filename=None, silent=False): log.warning(f'Setting: fn="{filename}" save disabled') return try: - # output = json.dumps(self.data, indent=2) diff = {} unused_settings = [] @@ -1086,9 +1085,6 @@ def save_atomic(self, filename=None, silent=False): log.debug('Settings: user') for k, v in self.data.items(): log.trace(f' Config: item={k} value={v} default={self.data_labels[k].default if k in self.data_labels else None}') - # log.debug('Settings: defaults') - # for k in self.data_labels.keys(): - # log.trace(f' Setting: item={k} default={self.data_labels[k].default}') for k, v in self.data.items(): if k in self.data_labels: diff --git a/modules/ui.py b/modules/ui.py index 4490bbf8c..6fd6595ed 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -234,6 +234,8 @@ def run_settings(*args): for key, value, comp in zip(opts.data_labels.keys(), args, components): if comp == dummy_component or value=='dummy': continue + if getattr(comp, 'visible', True) is False: + continue if not opts.same_type(value, opts.data_labels[key].default): log.error(f'Setting bad value: {key}={value} expecting={type(opts.data_labels[key].default).__name__}') continue