Fix Windows Crash via subprocess isolation#164
Open
Fristender wants to merge 2 commits into1038lab:mainfrom
Open
Fix Windows Crash via subprocess isolation#164Fristender wants to merge 2 commits into1038lab:mainfrom
Fristender wants to merge 2 commits into1038lab:mainfrom
Conversation
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.
Owner
|
Appreciate the explanation. we’ll review the code in detail before making a decision on this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.