mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-28 06:52:13 +08:00
import numpy Float64DType to avoid Hunyuan Avatar to crash
import numpy Float64DType to avoid Hunyuan Avatar to crash if your numpy version is < 2.0
This commit is contained in:
parent
ca4e96a8ae
commit
e7dc11e612
@ -41,7 +41,8 @@ if hasattr(torch.serialization, "add_safe_globals"): # TODO: this was added in
|
|||||||
|
|
||||||
from numpy.core.multiarray import scalar
|
from numpy.core.multiarray import scalar
|
||||||
from numpy import dtype
|
from numpy import dtype
|
||||||
from numpy.dtypes import Float64DType
|
import numpy as np
|
||||||
|
Float64DType = np.float64
|
||||||
from _codecs import encode
|
from _codecs import encode
|
||||||
|
|
||||||
torch.serialization.add_safe_globals([ModelCheckpoint, scalar, dtype, Float64DType, encode])
|
torch.serialization.add_safe_globals([ModelCheckpoint, scalar, dtype, Float64DType, encode])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user