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-08-24 15:43:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-comfy-aimdo (Old) and /work/SRC/openSUSE:Factory/.python-comfy-aimdo.new.1258 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-comfy-aimdo" Mon Aug 24 15:43:49 2026 rev:2 rq:1373273 version:0.4.14 Changes: -------- --- /work/SRC/openSUSE:Factory/python-comfy-aimdo/python-comfy-aimdo.changes 2026-08-21 17:02:04.447646566 +0200 +++ /work/SRC/openSUSE:Factory/.python-comfy-aimdo.new.1258/python-comfy-aimdo.changes 2026-08-24 15:44:01.881592981 +0200 @@ -1,0 +2,28 @@ +Sun Aug 23 17:31:30 UTC 2026 - Martin Pluskal <[email protected]> + +- Stop warning "Could not autodetect AIMDO implementation, assuming + Nvidia" on every start: add + comfy-aimdo-detect-vendor-without-local-version.patch + * the vendor check looked for "+cu" or "+rocm" in the PyTorch + version string, which only upstream's own wheels carry, so a + distribution PyTorch never matched and the code then guessed + Nvidia; it now reads the cuda and hip attributes that the same + version module already defines + * when PyTorch has neither, there is no allocator to load, so + init() reports failure with an informational message instead of + warning about a vendor it never really selected + * %check now exercises that path + +------------------------------------------------------------------- +Sun Aug 23 05:25:11 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to 0.4.14: + * README now documents AMD GPU (ROCm 7+) support alongside Nvidia + (CUDA 12.8+); the HIP backend itself already shipped in 0.4.13 + and is unchanged in this release + * Windows shared-memory detection reserves a larger VRAM headroom + (768 MB) when the free-memory figure comes from NVML rather than + from cuMemGetInfo() + * No changes to the pure-Python fallback shipped by this package + +------------------------------------------------------------------- Old: ---- comfy-aimdo-0.4.13.tar.gz New: ---- comfy-aimdo-0.4.14.tar.gz comfy-aimdo-detect-vendor-without-local-version.patch ----------(New B)---------- New: Nvidia" on every start: add comfy-aimdo-detect-vendor-without-local-version.patch * the vendor check looked for "+cu" or "+rocm" in the PyTorch ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-comfy-aimdo.spec ++++++ --- /var/tmp/diff_new_pack.2bp5Au/_old 2026-08-24 15:44:02.752624051 +0200 +++ /var/tmp/diff_new_pack.2bp5Au/_new 2026-08-24 15:44:02.755624159 +0200 @@ -18,12 +18,14 @@ %{?sle15_python_module_pythons} Name: python-comfy-aimdo -Version: 0.4.13 +Version: 0.4.14 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 +Patch0: comfy-aimdo-detect-vendor-without-local-version.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 61.0} BuildRequires: %{python_module setuptools-scm >= 8} @@ -61,6 +63,29 @@ # No upstream test suite. The native aimdo.so is not built; confirm the # Python modules import and the loader leaves lib unset. %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -B -c "import comfy_aimdo.control, comfy_aimdo.host_buffer, comfy_aimdo.model_mmap, comfy_aimdo.model_vbar, comfy_aimdo.vram_buffer; assert comfy_aimdo.control.lib is None" +# Patch0: without a CUDA or ROCm PyTorch, init() must report failure rather +# than guess a vendor, and it must not emit a warning while doing so. +cat > test_no_vendor.py <<'EOF' +import logging +import comfy_aimdo.control as c + +seen = [] + + +class Recorder(logging.Handler): + def emit(self, record): + seen.append(record) + + +logging.getLogger().addHandler(Recorder()) +assert c.detect_vendor() is None, c.detect_vendor() +assert c.init() is False +assert c.lib is None +guesses = [r.getMessage() for r in seen + if r.levelno >= logging.WARNING and "assuming Nvidia" in r.getMessage()] +assert not guesses, guesses +EOF +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -B test_no_vendor.py %files %{python_files} %license LICENSE ++++++ comfy-aimdo-0.4.13.tar.gz -> comfy-aimdo-0.4.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/comfy-aimdo-0.4.13/.github/workflows/cla.yml new/comfy-aimdo-0.4.14/.github/workflows/cla.yml --- old/comfy-aimdo-0.4.13/.github/workflows/cla.yml 2026-08-04 20:01:22.000000000 +0200 +++ new/comfy-aimdo-0.4.14/.github/workflows/cla.yml 2026-08-23 03:52:47.000000000 +0200 @@ -35,9 +35,12 @@ # For each commit emit the GitHub login when the author/committer email resolves to a GitHub account # otherwise fall back to the raw git name. run: | - others=$(gh api "repos/${{ github.repository }}/pulls/${PR_NUMBER}/commits" --paginate \ - --jq '.[] | (.author.login // .commit.author.name // empty), (.committer.login // .commit.committer.name // empty)' \ - | sort -u | grep -vix "${PR_AUTHOR}" | paste -sd, -) + if ! commit_authors=$(gh api "repos/${{ github.repository }}/pulls/${PR_NUMBER}/commits" --paginate \ + --jq '.[] | (.author.login // .commit.author.name // empty), (.committer.login // .commit.committer.name // empty)'); then + echo "Failed to fetch pull request commits" >&2 + exit 1 + fi + others=$(printf '%s\n' "$commit_authors" | sort -u | grep -vix "${PR_AUTHOR}" | paste -sd, -) if [ -n "$others" ]; then echo "allowlist=${BASE_ALLOWLIST},${others}" >> "$GITHUB_OUTPUT" else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/comfy-aimdo-0.4.13/README.md new/comfy-aimdo-0.4.14/README.md --- old/comfy-aimdo-0.4.13/README.md 2026-08-04 20:01:22.000000000 +0200 +++ new/comfy-aimdo-0.4.14/README.md 2026-08-23 03:52:47.000000000 +0200 @@ -4,9 +4,9 @@ ## Support: -* **Nvidia GPUs only** -* **Pytorch 2.8+** -* **Cuda 12.8+** +* **Nvidia GPUs** (CUDA) **and AMD GPUs** (ROCm/HIP) +* **PyTorch 2.8+** +* **CUDA 12.8+** (Nvidia) / **ROCm 7+** (AMD) * **Windows 11+** / **Linux** as per python ManyLinux support --- @@ -49,6 +49,8 @@ * VBAR allocation is done with `cuMemAddressReserve()`, faulting with `cuMemCreate()` and `cuMemMap()` and all frees done with appropriate converse APIs. * For consistency with VBAR memory management, main pytorch allocator plugin is also implemented with `cuMemAddressReserve` -> `cuMemCreate` -> `cuMemMap`. This also behaves a lot better on Windows systems with System Memory fallback. +On AMD, the equivalent HIP APIs (`hipMemAddressReserve` -> `hipMemCreate` -> `hipMemMap`, and their converse calls) are used throughout via the same flow. + ## Caveats: * There is no real way for this allocator to tell the difference between high usage and bad fragmentation in the pytorch caching allocator. As we always return success to the pytorch caching allocator it experiences no pressure while weights are being offloaded which means it can run in an extremely fragmented mode. The assumption is model weight access patterns are reasonably regular over blocks or iterations and it finds a good set of sizes to cache. What you should generally do though, is completely flush the pytorch caching allocator before each new model run, which avoids completely un-used reservations from taking priority over the next models weights. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/comfy-aimdo-0.4.13/src-win/shmem-detect.c new/comfy-aimdo-0.4.14/src-win/shmem-detect.c --- old/comfy-aimdo-0.4.13/src-win/shmem-detect.c 2026-08-04 20:01:22.000000000 +0200 +++ new/comfy-aimdo-0.4.14/src-win/shmem-detect.c 2026-08-23 03:52:47.000000000 +0200 @@ -104,6 +104,7 @@ /* FIXME: This should be 0 if sysmem fallback is disabled by the user */ #define WDDM_BUDGET_HEADROOM (512 * 1024 * 1024) #define CUDA_BUDGET_HEADROOM (192 * 1024 * 1024) +#define NVML_BUDGET_HEADROOM (768 * 1024 * 1024) bool poll_budget_deficit(const char **prevailing_deficit_method) { @@ -140,7 +141,8 @@ used_nvml = nvml_device && aimdo_nvml_memory_info(nvml_device, &free_vram, &total_vram); #endif if (used_nvml || CHECK_CU(cuMemGetInfo(&free_vram, &total_vram))) { - ssize_t deficit_cuda = (ssize_t)(CUDA_BUDGET_HEADROOM / 2) - (ssize_t)free_vram; + ssize_t headroom = used_nvml ? NVML_BUDGET_HEADROOM : CUDA_BUDGET_HEADROOM / 2; + ssize_t deficit_cuda = headroom - (ssize_t)free_vram; log(DEBUG, "%s: device memory free=%zu MB total=%zu MB deficit_cuda=%zd MB\n", ++++++ comfy-aimdo-detect-vendor-without-local-version.patch ++++++ Detect the PyTorch flavour properly, and stay quiet when there is none. detect_vendor() decides which native allocator to load by looking for the substrings "+cu" and "+rocm" in torch.__version__. Those only appear when PyTorch carries a local version label, which is how the upstream wheels are 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. 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 Could not autodetect AIMDO implementation, assuming Nvidia at warning level and then went on to guess "cuda", which only picked which of the two .so names to try before failing to open it a moment later. On a distribution build of PyTorch that warning is printed on every single start, for every user, whatever hardware they have, and it invites the reading that the wrong GPU vendor was selected. Return False instead, with an informational line that states what was actually detected. init() already returns False on this path once the CDLL fails, and its callers check the return value, so nothing downstream changes. --- comfy-aimdo-0.4.14.orig/comfy_aimdo/control.py +++ comfy-aimdo-0.4.14/comfy_aimdo/control.py @@ -28,6 +28,8 @@ def detect_vendor(): version = "" + cuda = None + hip = None try: torch_spec = importlib.util.find_spec("torch") for folder in torch_spec.submodule_search_locations: @@ -37,10 +39,16 @@ module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) version = module.__version__ + cuda = getattr(module, "cuda", None) + hip = getattr(module, "hip", None) except Exception as e: logging.warning("Failed to detect Torch version") pass + if hip: + return "rocm" + if cuda: + return "cuda" if '+cu' in version: return "cuda" if '+rocm' in version: @@ -61,8 +69,9 @@ implementation = detect_vendor() if implementation is None: - logging.warning("Could not autodetect AIMDO implementation, assuming Nvidia") - implementation = "cuda" + logging.info("comfy-aimdo: this PyTorch reports neither CUDA nor ROCm, " + "DynamicVRAM stays disabled") + return False impl = { "cuda": "aimdo",
