Files
Zhao Yingzhuo ec199c2a4f [feat]: update Readme, refactor code and add AutoModel hijack (#1)
* [doc]: fix readme

* [feat]: support torch.nn.Module cache and add test wf

* [refactor]: optimize directory structure
2025-03-21 18:19:23 +08:00

10 lines
259 B
Python

import torch
import sys
import os
torch._C._cuda_init()
model_cache_custom_path = os.path.join(os.path.dirname(__file__))
sys.path.append(model_cache_custom_path)
from hijack.hijack_list import hijack_all
sys.path.remove(model_cache_custom_path)
hijack_all()