Skip to content

Commit

Permalink
Fix upscale button remaining disabled after an error occured
Browse files Browse the repository at this point in the history
  • Loading branch information
Acly committed Feb 8, 2025
1 parent 92187d8 commit 9536fd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ai_diffusion/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,11 @@ def upscale_image(self):
return

self.clear_error()
self.upscale.set_in_progress(True)

eventloop.run(_report_errors(self, self._enqueue_job(job, inputs)))

self._doc.resize(job.params.bounds.extent)
self.upscale.set_in_progress(True)
self.upscale.target_extent_changed.emit(self.upscale.target_extent)

def estimate_cost(self, kind=JobKind.diffusion):
Expand Down Expand Up @@ -866,7 +867,7 @@ def _set_factor(self, value: float):
self._update_can_generate()

def _update_can_generate(self):
self.can_generate = not self._in_progress and (self.factor > 1.0 or self.use_diffusion)
self.can_generate = not self._in_progress

@property
def target_extent(self):
Expand Down

0 comments on commit 9536fd0

Please sign in to comment.