fix to do clearmemory before load model of PhiPrompt node

This commit is contained in:
chflame163
2024-10-16 21:47:18 +08:00
parent a1a37ed73b
commit c7c61ff3db
+1
View File
@@ -154,6 +154,7 @@ class LS_Phi_Prompt:
torch_dtype = torch.bfloat16
else:
torch_dtype = torch.float32
clear_memory()
if model == "Phi-3.5-mini-instruct":
try:
phi_model.model = AutoModelForCausalLM.from_pretrained(