Skip to content

Commit

Permalink
Fix UI overwriting previously set preferred checkpoint resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Acly committed Jan 5, 2024
1 parent e2d62fd commit 110d39f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ai_diffusion/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ class Settings(QObject):
_resolution_multiplier = Setting(
"Resolution Multiplier",
1.0,
"Scaling factor for image generation. Values below 1.0 improve performance when working"
" on high resolution canvas.",
"Scaling factor for generation. Values below 1.0 improve performance for high resolution"
" canvas.",
)

max_pixel_count: int
Expand Down
4 changes: 2 additions & 2 deletions ai_diffusion/ui/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,10 +965,10 @@ def _set_checkpoint_warning(self):
self._checkpoint_warning.setVisible(True)

def _toggle_preferred_resolution(self, checked: bool):
if checked:
if checked and self._resolution_spin.value == 0:
sd_ver = resolve_sd_version(self.current_style, root.connection.client_if_connected)
self._resolution_spin.value = 640 if sd_ver is SDVersion.sd15 else 1024
else:
elif not checked and self._resolution_spin.value > 0:
self._resolution_spin.value = 0

def _toggle_checkpoint_advanced(self, checked: bool):
Expand Down

0 comments on commit 110d39f

Please sign in to comment.