mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-11-27 06:40:10 +08:00
Avoid exceptions to be silenced
This commit is contained in:
parent
81126027f5
commit
4a66d2fb22
@ -178,12 +178,11 @@ def manual_cast(target_dtype):
|
||||
try:
|
||||
yield None
|
||||
finally:
|
||||
if not applied:
|
||||
return
|
||||
for module_type in patch_module_list:
|
||||
if hasattr(module_type, "org_forward"):
|
||||
module_type.forward = module_type.org_forward
|
||||
delattr(module_type, "org_forward")
|
||||
if applied:
|
||||
for module_type in patch_module_list:
|
||||
if hasattr(module_type, "org_forward"):
|
||||
module_type.forward = module_type.org_forward
|
||||
delattr(module_type, "org_forward")
|
||||
|
||||
|
||||
def autocast(disable=False):
|
||||
|
Loading…
Reference in New Issue
Block a user