Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Fix stream priority to support older pytorch. (#7856)

comfyanonymous5a50c3c7e59a
diff --git a/comfy/model_management.py b/comfy/model_management.py
index 516b6e2f1..78317af3c 100644
--- a/comfy/model_management.py
+++ b/comfy/model_management.py
@@ -962,7 +962,7 @@ def get_offload_stream(device):
elif is_device_cuda(device):
ss = []
for k in range(NUM_STREAMS):
- ss.append(torch.cuda.Stream(device=device, priority=10))
+ ss.append(torch.cuda.Stream(device=device, priority=0))
STREAMS[device] = ss
s = ss[stream_counter]
stream_counter = (stream_counter + 1) % len(ss)