Skip to content

Commit

Permalink
apply settings skip hidden
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Mandic <[email protected]>
  • Loading branch information
vladmandic committed Jan 7, 2025
1 parent 3d5cab6 commit 7461507
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
- scheduler api
- controlnet with hires
- controlnet with batch count
- apply settings skip hidden settings

## Update for 2024-12-31

Expand Down
4 changes: 0 additions & 4 deletions modules/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,17 +1078,13 @@ 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 = []

if self.debug:
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:
Expand Down
2 changes: 2 additions & 0 deletions modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7461507

Please sign in to comment.