mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-09 05:40:49 +08:00
Move threshold tensor to denoise mask device
Ensure threshold tensor is on the same device as denoise mask.
This commit is contained in:
parent
3cd7b32f1b
commit
cc5d177b54
@ -49,6 +49,9 @@ class DifferentialDiffusion(io.ComfyNode):
|
||||
|
||||
threshold = (current_ts - ts_to) / (ts_from - ts_to)
|
||||
|
||||
# Move the threshold tensor to the same device as denoise mask tensor
|
||||
threshold = threshold.to(denoise_mask.device)
|
||||
|
||||
# Generate the binary mask based on the threshold
|
||||
binary_mask = (denoise_mask >= threshold).to(denoise_mask.dtype)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user