mirror of
https://git.datalinker.icu/kijai/ComfyUI-CogVideoXWrapper.git
synced 2026-05-02 07:40:11 +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:
|
if "patch_embed" not in name:
|
||||||
param.data = param.data.to(torch.float8_e4m3fn)
|
param.data = param.data.to(torch.float8_e4m3fn)
|
||||||
else:
|
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":
|
if fp8_transformer == "fastmode":
|
||||||
from .fp8_optimization import convert_fp8_linear
|
from .fp8_optimization import convert_fp8_linear
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user