Skip to content

Commit

Permalink
Merge pull request #367 from mrhan1993:mrhan1993/issue363
Browse files Browse the repository at this point in the history
Error sometimes when stopping a job - Worker error: 'numpy.ndarray' object has no attribute 'im'
  • Loading branch information
mrhan1993 authored Jun 27, 2024
2 parents 4d4c863 + 9744095 commit 9668537
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fooocusapi/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,13 +993,15 @@ def callback(step, x0, x, total_steps, y):
results += imgs
except model_management.InterruptProcessingException as e:
logger.std_warn("[Fooocus] User stopped")
results = []
results.append(ImageGenerationResult(
im=None, seed=task['task_seed'], finish_reason=GenerationFinishReason.user_cancel))
async_task.set_result(results, True, str(e))
break
except Exception as e:
logger.std_error(f'[Fooocus] Process error: {e}')
logging.exception(e)
results = []
results.append(ImageGenerationResult(
im=None, seed=task['task_seed'], finish_reason=GenerationFinishReason.error))
async_task.set_result(results, True, str(e))
Expand Down

0 comments on commit 9668537

Please sign in to comment.