Commit ae43680
fix(cross-platform): cuda fallback in locate_anything + reap leaked ffmpeg in video IO
locate_anything.py: device widget defaults to "cuda" — on a CPU-only box (no
NVIDIA / hardware accel off) .to("cuda") raised. Resolve to cpu when
torch.cuda.is_available() is False so the node degrades instead of crashing
(matches "must work even if hardware accel is off"). Static, no GPU to verify.
Source: https://pytorch.org/docs/stable/generated/torch.cuda.is_available.html
_video_comparer_io.py: the imageio+ffmpeg fallback reader's rd.close() was
skipped if decoding raised mid-loop, orphaning the ffmpeg subprocess (a leaked
child consuming CPU under ComfyUI). Wrapped in try/finally so it's always reaped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
(cherry picked from commit 880a319)1 parent cc8648d commit ae43680
1 file changed
Lines changed: 17 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
129 | 132 | | |
130 | 133 | | |
131 | 134 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| |||
0 commit comments