Commit 4a66d2fb authored by Kohaku-Blueleaf's avatar Kohaku-Blueleaf

Avoid exceptions to be silenced

parent 81126027
...@@ -178,8 +178,7 @@ def manual_cast(target_dtype): ...@@ -178,8 +178,7 @@ def manual_cast(target_dtype):
try: try:
yield None yield None
finally: finally:
if not applied: if applied:
return
for module_type in patch_module_list: for module_type in patch_module_list:
if hasattr(module_type, "org_forward"): if hasattr(module_type, "org_forward"):
module_type.forward = module_type.org_forward module_type.forward = module_type.org_forward
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment