diff --git a/unsloth/_gpu_init.py b/unsloth/_gpu_init.py index 7869d9e2b5..1ed3d1768f 100644 --- a/unsloth/_gpu_init.py +++ b/unsloth/_gpu_init.py @@ -199,8 +199,10 @@ if os.environ.get("UNSLOTH_FORCE_SINGLE_COMPILE_WORKER", "0") == "1": pass os.environ["TORCHINDUCTOR_COMPILE_THREADS"] = "1" try: - from unsloth_zoo.temporary_patches import common as _zoo_common - _zoo_common.determine_compile_threads = lambda: 1 + setattr( + importlib.import_module("unsloth_zoo.temporary_patches.common"), + "determine_compile_threads", lambda: 1, + ) except Exception: pass