Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-comfy-aimdo for openSUSE:Factory checked in at 2026-09-08 16:54:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-comfy-aimdo (Old) and /work/SRC/openSUSE:Factory/.python-comfy-aimdo.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-comfy-aimdo" Tue Sep 8 16:54:23 2026 rev:5 rq:1376110 version:0.5.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-comfy-aimdo/python-comfy-aimdo.changes 2026-09-04 12:39:17.912242142 +0200 +++ /work/SRC/openSUSE:Factory/.python-comfy-aimdo.new.1265/python-comfy-aimdo.changes 2026-09-08 16:55:30.622451681 +0200 @@ -1,0 +2,8 @@ +Mon Sep 7 06:38:03 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to 0.5.2: + * New malloc_graph_abort() to tear down an incomplete malloc graph + safely, aimed at a hard crash on workflow cancel; it lives in the + native allocator, which this build does not compile + +------------------------------------------------------------------- Old: ---- comfy-aimdo-0.5.0.tar.gz New: ---- comfy-aimdo-0.5.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-comfy-aimdo.spec ++++++ --- /var/tmp/diff_new_pack.oqKYD4/_old 2026-09-08 16:55:31.909504756 +0200 +++ /var/tmp/diff_new_pack.oqKYD4/_new 2026-09-08 16:55:31.914504962 +0200 @@ -18,13 +18,13 @@ %{?sle15_python_module_pythons} Name: python-comfy-aimdo -Version: 0.5.0 +Version: 0.5.2 Release: 0 Summary: AI Model Dynamic Offloader for ComfyUI (pure-Python fallback) License: GPL-3.0-only URL: https://github.com/Comfy-Org/comfy-aimdo Source: https://github.com/Comfy-Org/comfy-aimdo/archive/refs/tags/v%{version}.tar.gz#/comfy-aimdo-%{version}.tar.gz -# PATCH-FIX-UPSTREAM comfy-aimdo-detect-vendor-without-local-version.patch [email protected] -- read torch's own cuda/hip attributes instead of the wheel-only version suffix, and skip quietly when there is no accelerator +# PATCH-FIX-OPENSUSE comfy-aimdo-detect-vendor-without-local-version.patch [email protected] -- read torch's own cuda/hip attributes instead of the wheel-only version suffix, and skip quietly when there is no accelerator Patch0: comfy-aimdo-detect-vendor-without-local-version.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 61.0} ++++++ comfy-aimdo-0.5.0.tar.gz -> comfy-aimdo-0.5.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/comfy-aimdo-0.5.0/comfy_aimdo/control.py new/comfy-aimdo-0.5.2/comfy_aimdo/control.py --- old/comfy-aimdo-0.5.0/comfy_aimdo/control.py 2026-08-31 15:18:29.000000000 +0200 +++ new/comfy-aimdo-0.5.2/comfy_aimdo/control.py 2026-09-05 00:25:48.000000000 +0200 @@ -125,6 +125,9 @@ lib.malloc_graph_pop.argtypes = [ctypes.c_void_p] lib.malloc_graph_pop.restype = ctypes.c_int + lib.malloc_graph_abort.argtypes = [ctypes.c_void_p] + lib.malloc_graph_abort.restype = ctypes.c_bool + lib.malloc_graph_stat.argtypes = [ctypes.c_void_p, ctypes.c_int] lib.malloc_graph_stat.restype = ctypes.c_uint64 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/comfy-aimdo-0.5.0/comfy_aimdo/malloc_graph.py new/comfy-aimdo-0.5.2/comfy_aimdo/malloc_graph.py --- old/comfy-aimdo-0.5.0/comfy_aimdo/malloc_graph.py 2026-08-31 15:18:29.000000000 +0200 +++ new/comfy-aimdo-0.5.2/comfy_aimdo/malloc_graph.py 2026-09-05 00:25:48.000000000 +0200 @@ -27,6 +27,10 @@ self._scopes.pop() return broken + def abort(self): + self._call(control.lib.malloc_graph_abort) + self._scopes.clear() + def pause(self, sync=False): self._call(control.lib.malloc_graph_pause, True, sync) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/comfy-aimdo-0.5.0/src/malloc-graph.c new/comfy-aimdo-0.5.2/src/malloc-graph.c --- old/comfy-aimdo-0.5.0/src/malloc-graph.c 2026-08-31 15:18:29.000000000 +0200 +++ new/comfy-aimdo-0.5.2/src/malloc-graph.c 2026-09-05 00:25:48.000000000 +0200 @@ -119,6 +119,7 @@ bool sync_paused; bool assert_breaks; bool handoff_attempted; + bool aborted; } MallocGraph; static _Thread_local MallocGraph *active_graph; @@ -654,6 +655,35 @@ } } +static bool abort_graph(MallocGraph *g) { + if (g->aborted) { + return true; + } + if (g->handoff_attempted) { + return false; + } + g->handoff_attempted = true; + + State *top = g->state; + for (State *state = top; state; state = state->next) { + g->state = state; + if (!materialize(g, state->cursor) || !collect_rogue_candidates(g)) { + g->state = top; + active_graph = NULL; + return false; + } + } + g->state = top; + active_graph = NULL; + + if (!handoff_rogues(g)) { + return false; + } + free_rogue_candidates(g); + g->aborted = true; + return true; +} + static bool finalize_rogues(MallocGraph *g) { if (!g->rogue_candidates) { return true; @@ -740,6 +770,7 @@ g->used = allocation_used(g); free_rogue_candidates(g); + g->handoff_attempted = false; return true; fail: @@ -1152,6 +1183,16 @@ return result; } +SHARED_EXPORT bool malloc_graph_abort(void *handle) { + MallocGraph *g = handle; + + if (!g || g->owner_thread != &active_graph || + (!g->aborted && g != active_graph)) { + return false; + } + return abort_graph(g); +} + SHARED_EXPORT uint64_t malloc_graph_stat(void *handle, int which) { MallocGraph *g = handle; @@ -1196,15 +1237,8 @@ return; } - if (active_graph == g) { - active_graph = NULL; - } - - if (g->rogue_candidates) { - if (!g->handoff_attempted) { - handoff_rogues(g); - } - free_rogue_candidates(g); + if (g->state && !abort_graph(g)) { + return; } while (g->state) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/comfy-aimdo-0.5.0/tests/malloc-graph-abort-cuda.py new/comfy-aimdo-0.5.2/tests/malloc-graph-abort-cuda.py --- old/comfy-aimdo-0.5.0/tests/malloc-graph-abort-cuda.py 1970-01-01 01:00:00.000000000 +0100 +++ new/comfy-aimdo-0.5.2/tests/malloc-graph-abort-cuda.py 2026-09-05 00:25:48.000000000 +0200 @@ -0,0 +1,66 @@ +import gc +import threading + +import comfy_aimdo.control as aimdo +import torch + + +M = 1024 * 1024 + +assert aimdo.init("cuda") +assert aimdo.init_device(torch.cuda.current_device()) +torch.empty(1, device="cuda") +torch.cuda.synchronize() +baseline = aimdo.get_total_vram_usage() + +graph = aimdo.record(torch.cuda.current_stream(), assert_graph_breaks=True) +root = torch.empty(M, dtype=torch.uint8, device="cuda") +root.fill_(17) +graph.push("block") +nested = torch.empty(8 * M, dtype=torch.uint8, device="cuda") +nested.fill_(23) +graph.abort() +graph.abort() +del graph +gc.collect() + +replacement = torch.empty(8 * M, dtype=torch.uint8, device="cuda") +replacement.fill_(31) +assert root[0].item() == 17 +assert nested[-1].item() == 23 +del replacement + +holder = [nested] +del nested +thread = threading.Thread(target=lambda: holder.pop()) +thread.start() +thread.join() +del root +gc.collect() + +graph = aimdo.record(torch.cuda.current_stream()) +graph.push("block") +value = torch.empty(8 * M, dtype=torch.uint8, device="cuda") +pointer = value.data_ptr() +del value +assert not graph.pop() +assert not graph.pop() + +graph.push() +graph.push("block") +value = torch.empty(8 * M, dtype=torch.uint8, device="cuda") +assert value.data_ptr() == pointer +value.fill_(41) +del graph +gc.collect() + +replacement = torch.empty(8 * M, dtype=torch.uint8, device="cuda") +replacement.fill_(47) +assert value[0].item() == 41 +del replacement, value +gc.collect() +torch.cuda.synchronize() +assert aimdo.get_total_vram_usage() == baseline + +aimdo.deinit() +print("CUDA malloc graph abort test passed") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/comfy-aimdo-0.5.0/tests/run-malloc-graph-cuda.py new/comfy-aimdo-0.5.2/tests/run-malloc-graph-cuda.py --- old/comfy-aimdo-0.5.0/tests/run-malloc-graph-cuda.py 2026-08-31 15:18:29.000000000 +0200 +++ new/comfy-aimdo-0.5.2/tests/run-malloc-graph-cuda.py 2026-09-05 00:25:48.000000000 +0200 @@ -48,6 +48,7 @@ "malloc-graph-rogue-alias-cuda.py", "malloc-graph-rogue-reuse-cuda.py", "malloc-graph-small-rogue-cuda.py", + "malloc-graph-abort-cuda.py", ) directory = Path(__file__).parent ++++++ comfy-aimdo-detect-vendor-without-local-version.patch ++++++ --- /var/tmp/diff_new_pack.oqKYD4/_old 2026-09-08 16:55:32.059510942 +0200 +++ /var/tmp/diff_new_pack.oqKYD4/_new 2026-09-08 16:55:32.066511231 +0200 @@ -6,8 +6,8 @@ built but not how a distribution builds it: openSUSE's PyTorch reports a plain "2.12.0a0". The very version.py that detect_vendor() executes also defines the authoritative "cuda" and "hip" attributes, so read those first and keep the -substring test as a fallback. This half matches the pending upstream change in -Comfy-Org/comfy-aimdo#84. +substring test as a fallback. This half matched Comfy-Org/comfy-aimdo#84, which +upstream closed without merging, so the patch stays downstream. When neither is set, PyTorch genuinely has no CUDA and no ROCm support, and there is no allocator that could be loaded. init() previously logged
