mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-02 18:57:09 +08:00
Fixes
This commit is contained in:
parent
929b65aea8
commit
74e5afcbf2
@ -168,6 +168,7 @@ class BaseModel(torch.nn.Module):
|
|||||||
if self.manual_cast_dtype is not None:
|
if self.manual_cast_dtype is not None:
|
||||||
dtype = self.manual_cast_dtype
|
dtype = self.manual_cast_dtype
|
||||||
|
|
||||||
|
xc = xc.to(dtype)
|
||||||
t = self.model_sampling.timestep(t).float()
|
t = self.model_sampling.timestep(t).float()
|
||||||
if context is not None:
|
if context is not None:
|
||||||
context = context.to(dtype)
|
context = context.to(dtype)
|
||||||
@ -1208,7 +1209,7 @@ class WAN21(BaseModel):
|
|||||||
if image.shape[1] > (extra_channels - 4):
|
if image.shape[1] > (extra_channels - 4):
|
||||||
image = image[:, :(extra_channels - 4)]
|
image = image[:, :(extra_channels - 4)]
|
||||||
|
|
||||||
mask = kwargs.get("concat_mask", kwargs.get("denoise_mask", None)) if "concat_mask" in kwargs or "denoise_mask" in kwargs else None
|
mask = kwargs.get("concat_mask", kwargs.get("denoise_mask", None))
|
||||||
if mask is None:
|
if mask is None:
|
||||||
mask = torch.zeros_like(noise)[:, :4]
|
mask = torch.zeros_like(noise)[:, :4]
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user