mirror of
https://git.datalinker.icu/kijai/ComfyUI-CogVideoXWrapper.git
synced 2025-12-09 12:54:22 +08:00
possible fix for NaNs when using LoRA and fp8
This commit is contained in:
parent
ac5daa7148
commit
276b3b86d9
5
nodes.py
5
nodes.py
@ -372,7 +372,10 @@ class DownloadAndLoadCogVideoModel:
|
||||
if "patch_embed" not in name:
|
||||
param.data = param.data.to(torch.float8_e4m3fn)
|
||||
else:
|
||||
transformer.to(torch.float8_e4m3fn)
|
||||
#transformer.to(torch.float8_e4m3fn)
|
||||
for name, param in transformer.named_parameters():
|
||||
if "lora" not in name:
|
||||
param.data = param.data.to(torch.float8_e4m3fn)
|
||||
|
||||
if fp8_transformer == "fastmode":
|
||||
from .fp8_optimization import convert_fp8_linear
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user