[PR #44] [CLOSED] fix: use module attributes to detect vendor directly #84

Closed
opened 2026-10-26 22:24:25 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-aimdo/pull/44
Author: @lalala-233
Created: 5/2/2026
Status: ❌ Closed

Base: master ← Head: master


📝 Commits (2)

  • 8281492 fix: use module attributes to detect vendor directly
  • 7682342 fix: remove duplicate code

📊 Changes

1 file changed (+4 additions, -7 deletions)

View changed files

📝 comfy_aimdo/control.py (+4 -7)

📄 Description

Current vendor check relies on version.py's __version__:

github.com/Comfy-Org/comfy-aimdo@604f3551d6/comfy_aimdo/control.py (L12-L31)

However, in my PC, __version__ is 2.11.0 with no suffix, so this function returns None.

But..

#/usr/lib/python3.14/site-packages/torch/version.py
from typing import Optional

__all__ = ['__version__', 'debug', 'cuda', 'git_version', 'hip', 'rocm', 'xpu']
__version__ = '2.11.0'
debug = False
cuda: Optional[str] = '13.2'
git_version = '70d99e998b4955e0049d13a98d77ae1b14db1f45'
hip: Optional[str] = None
rocm: Optional[str] = None
xpu: Optional[str] = None

I can use cuda actually.

So I refactor detect_rendor to use module attributes directly.

But I haven't tested if it break anything in other's PC. It works well on my PC. Could someone help me test it?

Contribution Agreement

  • I agree that my contributions are licensed under the GPLv3.
  • I grant Comfy Org the rights to relicense these contributions as outlined in CONTRIBUTING.md.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-aimdo/pull/44 **Author:** [@lalala-233](https://github.com/lalala-233) **Created:** 5/2/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`8281492`](https://github.com/Comfy-Org/comfy-aimdo/commit/82814921e291106c4c7d38d06dda2e649612b4b1) fix: use module attributes to detect vendor directly - [`7682342`](https://github.com/Comfy-Org/comfy-aimdo/commit/7682342ae0ba8beb930ba6b0010503c3cb0dfa75) fix: remove duplicate code ### 📊 Changes **1 file changed** (+4 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `comfy_aimdo/control.py` (+4 -7) </details> ### 📄 Description Current vendor check relies on `version.py`'s `__version__`: https://github.com/Comfy-Org/comfy-aimdo/blob/604f3551d667c6cd34cd5f931d160b32e674ff66/comfy_aimdo/control.py#L12-L31 However, in my PC, `__version__` is `2.11.0` with no suffix, so this function returns `None`. But.. ```python #/usr/lib/python3.14/site-packages/torch/version.py from typing import Optional __all__ = ['__version__', 'debug', 'cuda', 'git_version', 'hip', 'rocm', 'xpu'] __version__ = '2.11.0' debug = False cuda: Optional[str] = '13.2' git_version = '70d99e998b4955e0049d13a98d77ae1b14db1f45' hip: Optional[str] = None rocm: Optional[str] = None xpu: Optional[str] = None ``` I can use cuda actually. So I refactor `detect_rendor` to use module attributes directly. But I haven't tested if it break anything in other's PC. It works well on my PC. Could someone help me test it? ### Contribution Agreement - [x] I agree that my contributions are licensed under the GPLv3. - [x] I grant **Comfy Org** the rights to relicense these contributions as outlined in [CONTRIBUTING.md](./CONTRIBUTING.md). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:24:25 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-aimdo#84
No description provided.