Skip to content

Conversation

@Fristender
Copy link

2 Commits:
Fix Windows RMBG-2.0 crash via subprocess isolation
On some Windows setups, executing the bundled RMBG-2.0 model code can crash the host process (torch_cpu.dll access violation).

Run RMBG-2.0 inference in a separate Python subprocess by default on Windows and return the generated masks back to the node.

Add opt-in debug markers (COMFYUI_RMBG_DEBUG_PROGRESS) and toggles (COMFYUI_RMBG_RMBG2_SUBPROCESS, COMFYUI_RMBG_DEBUG_KEEP_TEMP).

Make optional deps non-fatal on Windows; lazy-import SAM3
Skip groundingdino-py installation on Windows (optional; node already falls back when unavailable).

Lazy-import SAM3 internals so missing assets/deps don’t break ComfyUI startup.

On some Windows setups, executing the bundled RMBG-2.0 model code can crash the host process (torch_cpu.dll access violation).

Run RMBG-2.0 inference in a separate Python subprocess by default on Windows and return the generated masks back to the node.

Add opt-in debug markers (COMFYUI_RMBG_DEBUG_PROGRESS) and toggles (COMFYUI_RMBG_RMBG2_SUBPROCESS, COMFYUI_RMBG_DEBUG_KEEP_TEMP).
Skip groundingdino-py installation on Windows (optional; node already falls back when unavailable).

Lazy-import SAM3 internals so missing assets/deps don’t break ComfyUI startup.
@1038lab
Copy link
Owner

1038lab commented Jan 13, 2026

Appreciate the explanation. we’ll review the code in detail before making a decision on this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants