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

This commit is contained in:
comfyanonymous 2025-04-28 10:07:21 -07:00 committed by GitHub
parent 30159a7fe6
commit 5a50c3c7e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)