Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] TypeError: catching classes that do not inherit from BaseException is not allowed #3327

Closed
mashb1t opened this issue Jul 20, 2024 · 0 comments · Fixed by #3332
Closed
Labels
bug Something isn't working

Comments

@mashb1t
Copy link
Collaborator

mashb1t commented Jul 20, 2024

I got this error from terminal. I am running on a low-end system.

Traceback (most recent call last):
File "F:\fooocus\Fooocus_win64_2-5-0\Fooocus\modules\async_worker.py", line 1181, in handler
denoising_strength, initial_latent, width, height, current_progress = apply_inpaint(async_task,
File "F:\fooocus\Fooocus_win64_2-5-0\Fooocus\modules\async_worker.py", line 484, in apply_inpaint
inpaint_worker.current_task = inpaint_worker.InpaintWorker(
File "F:\fooocus\Fooocus_win64_2-5-0\Fooocus\modules\inpaint_worker.py", line 162, in init
self.interested_image = perform_upscale(self.interested_image)
File "F:\fooocus\Fooocus_win64_2-5-0\Fooocus\modules\upscaler.py", line 30, in perform_upscale
img = opImageUpscaleWithModel.upscale(model, img)[0]
File "F:\fooocus\Fooocus_win64_2-5-0\Fooocus\ldm_patched\contrib\external_upscale_model.py", line 54, in upscale
s = ldm_patched.modules.utils.tiled_scale(in_img, lambda a: upscale_model(a), tile_x=tile, tile_y=tile, overlap=overlap, upscale_amount=upscale_model.scale, pbar=pbar)
File "F:\fooocus\Fooocus_win64_2-5-0\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "F:\fooocus\Fooocus_win64_2-5-0\Fooocus\ldm_patched\modules\utils.py", line 418, in tiled_scale
ps = function(s_in).to(output_device)
RuntimeError: CUDA error: the launch timed out and was terminated
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "F:\fooocus\Fooocus_win64_2-5-0\Fooocus\modules\async_worker.py", line 1440, in worker
handler(task)
File "F:\fooocus\Fooocus_win64_2-5-0\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "F:\fooocus\Fooocus_win64_2-5-0\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "F:\fooocus\Fooocus_win64_2-5-0\Fooocus\modules\async_worker.py", line 1193, in handler
except EarlyReturnException:
TypeError: catching classes that do not inherit from BaseException is not allowed
Total time: 34.91 seconds

Originally posted by @lomeiyemei in #3323 (reply in thread)

@mashb1t mashb1t added the bug Something isn't working label Jul 21, 2024
mashb1t added a commit to mashb1t/Fooocus that referenced this issue Jul 21, 2024
fixes lllyasviel#3327
as discussed in lllyasviel#3323

add missing inheritance for EarlyReturnException from BaseException to correctly throw and catch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant