Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
modelflat committed Nov 26, 2024
1 parent ae62142 commit 00e14fa
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 @@ -827,7 +827,7 @@ class LiveWorkspace(QObject, ObservableProperties):

_model: Model
_last_input: WorkflowInput | None = None
_last_change: float = 0.0
_last_change: float = 0
_result: Image | None = None
_result_composition: Image | None = None
_result_params: JobParams | None = None
Expand Down Expand Up @@ -881,9 +881,10 @@ async def _continue_generating(self):
now = time.monotonic()
if self._last_change + settings.live_redraw_grace_period <= now:
await self._model._generate_live(new_input, job_params)
self._last_change = time.monotonic()
self._last_input = new_input
return
else:
self._last_change = time.monotonic()
await asyncio.sleep(self._poll_rate)

def apply_result(self, layer_only=False):
Expand Down

0 comments on commit 00e14fa

Please sign in to comment.