mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-06 13:16:29 +00:00
Make sure context is on the right device. (#9154)
This commit is contained in:
parent
5f582a9757
commit
13aaa66ec2
@ -171,12 +171,12 @@ class BaseModel(torch.nn.Module):
|
|||||||
dtype = self.manual_cast_dtype
|
dtype = self.manual_cast_dtype
|
||||||
|
|
||||||
xc = xc.to(dtype)
|
xc = xc.to(dtype)
|
||||||
|
device = xc.device
|
||||||
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=dtype, device=device)
|
||||||
|
|
||||||
extra_conds = {}
|
extra_conds = {}
|
||||||
device = xc.device
|
|
||||||
for o in kwargs:
|
for o in kwargs:
|
||||||
extra = kwargs[o]
|
extra = kwargs[o]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user