552 Commits
Author SHA1 Message Date
chflame163 a3459a7638 Merge pull request #610 from li-lizhe/feat/device-auto-list
Add 'auto' device option to nodes with hardcoded CUDA/CPU device lists
2026-09-16 10:50:34 +08:00
li-lizhe 2176b74083 Add 'auto' device option to nodes with hardcoded CUDA/CPU device lists
Several nodes only exposed a 'cuda'/'cpu' device dropdown, forcing users on
any other ComfyUI-supported accelerator (Ascend NPU, XPU, MPS) to run on CPU
even when their device is available.

Add a shared DEVICE_LIST_OPTIONS constant and get_device() helper in
imagefunc.py that resolve 'auto' to ComfyUI's default device, and use them in
the VITMatte-based matting nodes and the VQA model loader so non-CUDA devices
can be selected from the UI.
2026-09-16 10:08:47 +08:00
chflame163 5ba939099b Merge pull request #609 from li-lizhe/comfy-device-selection
Use ComfyUI's device selection instead of hardcoded CUDA checks
2026-09-03 09:15:00 +08:00
li-lizhe 6555d35004 Use ComfyUI's device selection instead of hardcoded CUDA checks
Several model-loading and processing paths pick their device with
`"cuda" if torch.cuda.is_available() else "cpu"`, and move tensors with
`.cuda()` guarded by the same check:

- `imagefunc.load_RMBG_model` / `RMBG`
- `imagefunc.get_masked_VITMatte_image` (vitmatte)
- `imagefunc.UformGen2QwenChat`
- `imagefunc.clear_memory`
- `blendmodes.rgb_to_hsv_via_torch` / `hsv_to_rgb_via_torch`

On any non-CUDA accelerator that ComfyUI itself supports (e.g. Ascend NPU
via torch_npu, which ComfyUI's own `comfy.model_management.get_torch_device`
returns a `torch.device("npu")` for), these paths silently fall back to the
CPU or, for `.cuda()`, move the input to a CUDA device that does not exist.

This repo already imports `comfy.model_management` (e.g. in `purge_vram.py`),
so use its device selection for consistency with the rest of ComfyUI:

- `load_RMBG_model`, `UformGen2QwenChat`, and the blendmode helpers now use
  `comfy.model_management.get_torch_device()`.
- `RMBG` moves the input to the device of the (lru-cached) model itself
  instead of probing CUDA, so it also follows device changes correctly.
- the vitmatte path uses the ComfyUI device unless the caller explicitly
  asked for CPU; a hardcoded "cuda" request without CUDA available now logs
  and uses the ComfyUI default.
- cache clearing also calls `torch.accelerator.empty_cache()` when a
  non-CUDA accelerator is present (`torch.accelerator` is the device-agnostic
  PyTorch API).

Verified on Ascend 910B (torch 2.14.0a0 + torch_npu 2.14.0) with
ComfyUI-master's `comfy.model_management` implementation:
`get_torch_device()` returns `torch.device("npu", 0)`, a conv2d forward and
an RMBG-style model/input flow run on `npu:0`, and
`torch.accelerator.empty_cache()` is callable. On CUDA machines the selected
device is unchanged (`cuda`).
2026-09-02 16:02:58 +08:00
chflame163 557d882e18 The output of ImageReelComposit node is mandated to be even number 2026-08-18 13:13:45 +08:00
chflame163 953676c592 fix bug for ImageReelComposit node when processing Image Batch 2026-08-18 12:33:06 +08:00
chflame163 64f976fec8 update pyproject.toml for new version 2026-08-01 11:16:11 +08:00
chflame163 34755c8fec Merge pull request #607 from jtydhr88/fix-native-color-widget
fix: prevent duplicate COLOR widget on frontends with a native color widget
2026-08-01 10:34:04 +08:00
Terry Jia fe79394223 fix: prevent duplicate COLOR widget on frontends with a native color widget 2026-07-31 22:07:18 -04:00
chflame163 02acdc50af commit PadImageBatch and RestorePadImageBatch nodes 2026-07-23 13:45:00 +08:00
chflame163 d94bef1ee5 Ultra nodes support vitmatte-base-composition-1k 2026-01-30 14:31:45 +08:00
chflame163 3d53de09d8 fix debug info 2026-01-11 12:52:41 +08:00
chflame163 ef5c45afe3 add debug info of ImageBatchToList and ImageListToBatch nodes 2026-01-11 12:50:28 +08:00
chflame163 3ab3e38192 commit ImageBatchToList and ImageListToBatch nodes 2026-01-11 09:30:22 +08:00
chflame163 0d88b177d4 fix bug of ImageCompositHandleMask 2026-01-09 12:01:16 +08:00
chflame163 421a1c1076 update readme 2026-01-08 17:53:11 +08:00
chflame163 a1875e824c commit DistortDisplace node 2026-01-08 17:50:29 +08:00
chflame163 d256c3a057 commit MaskEdgeUltraDetailV3 node 2026-01-08 00:56:41 +08:00
chflame163 5840264d0d fix bug of converting BF16 tensor to pillow image 2025-12-29 15:52:57 +08:00
chflame163 3b17c7f488 Merge pull request #590 from comfyui-wiki/revert-workflow-changes
Revert workflow changes and bump version to 2.0.32
2025-12-24 15:03:50 +08:00
ComfyUI Wiki 2cc6781df6 Bump version to 2.0.32 2025-12-24 06:52:29 +00:00
ComfyUI Wiki 486cddd4c7 Revert workflow changes 2025-12-24 06:52:02 +00:00
chflame163 2251e22691 Bump version to 2.0.31 2025-12-24 14:45:29 +08:00
chflame163 fd3080bef4 Merge pull request #589 from comfyui-wiki/Bump-version-to-2.0.30
Bump version to 2.0.30
2025-12-24 14:27:16 +08:00
ComfyUI Wiki 9cfc24da3a Bump version to 2.0.30 2025-12-24 13:59:48 +08:00
chflame163 2d47e3dddb Merge pull request #588 from bigcat88/set-default-val-for-random-seed
make the initial value of a random seed deterministic
2025-12-24 09:52:07 +08:00
bigcat88 dcb96084a5 make the initial value of a random seed deterministic 2025-12-23 18:02:03 +02:00
chflame163 5289d095b6 Merge pull request #587 from comfyui-wiki/comfyui-wiki-patch-1
更新自动发布工作流,只在版本变更时执行发布
2025-12-23 22:37:34 +08:00
ComfyUI Wiki 8054e3c149 Update GitHub Actions workflow for publishing 2025-12-23 22:33:46 +08:00
chflame163 860502b381 Merge pull request #586 from comfyui-wiki/Add-icon
Add icon
2025-12-23 21:41:08 +08:00
ComfyUI Wiki c4d55737e2 Add icon 2025-12-23 21:38:15 +08:00
chflame163 d34c72a6e4 Merge pull request #585 from comfyui-wiki/bump-version-to-2.0.29
Bump version to 2.0.29
2025-12-23 21:10:55 +08:00
ComfyUI Wiki 27a5627098 Bump version to 2.0.29 2025-12-23 21:09:36 +08:00
chflame163 d9c492e068 Merge pull request #584 from comfyui-wiki/feat/add-node-publish-workflow
[feat] 添加自动发布到 comfy registry 的 github 工作流
2025-12-23 21:05:41 +08:00
ComfyUI Wiki 334b0fc6fc Add node publish workflow 2025-12-23 20:56:41 +08:00
chflame163 ca07ce8edf Merge pull request #581 from flybirdxx/main
Fixed the color picker not working properly
2025-12-11 18:41:43 +08:00
flybirdxx a078670439 Merge pull request #1 from flybirdxx/flybirdxx-fix-colorpick
让取色器暂时可用
2025-12-11 18:02:20 +08:00
flybirdxx 25b614885e 让取色器暂时可用
现在暂时让取舍器恢复可用了,但是那个按钮不知道咋改回去,尽力了
2025-12-11 18:02:00 +08:00
chflame163 90f4bfb38a update example workflow 2025-11-21 18:27:38 +08:00
chflame163 3c697dbcbc fix node category 2025-11-21 18:23:20 +08:00
chflame163 501e46faa1 fix bug of node value 2025-11-21 17:53:23 +08:00
chflame163 610307802d commit ImageCompositeHandleMask node 2025-11-21 17:34:22 +08:00
chflame163 4f4d5cbbe4 update DrawRoundedRectangle node and readme 2025-11-07 23:30:43 +08:00
chflame163 de6d880d47 commit DrawRoundedRectangle node 2025-11-07 23:03:52 +08:00
chflame163 89014d833d commit NanoBanana Image Scale node 2025-09-11 00:06:21 +08:00
chflame163 42ccdd8f75 commit ColorNegative,MaskBoxExtend,FluxKontextImageScale nodes 2025-08-09 20:53:07 +08:00
chflame163 677468955a commit LoadImagesFromPath and ImageTaggerSaveV2 nodes 2025-08-04 20:35:34 +08:00
chflame163 3bfe8e435d remove LUT Apply node debug info 2025-06-20 08:44:58 +08:00
chflame163 a46b1e6d26 update readme images 2025-05-17 20:58:01 +08:00
chflame163 917d59f63c commit SegformerUltraV2, LoadSegformerModel, SegformerClothesSetting and SegformerFashionSetting nodes 2025-05-17 20:55:42 +08:00