Skip to content

Fix SAM3 loading in desktop ComfyUI installs#113

Open
artokun wants to merge 1 commit into
PozzettiAndrea:mainfrom
artokun:codex/fix-desktop-comfyui-bootstrap
Open

Fix SAM3 loading in desktop ComfyUI installs#113
artokun wants to merge 1 commit into
PozzettiAndrea:mainfrom
artokun:codex/fix-desktop-comfyui-bootstrap

Conversation

@artokun
Copy link
Copy Markdown

@artokun artokun commented Apr 8, 2026

Summary

  • bootstrap the real ComfyUI core path before
    egister_nodes() runs
  • do the same bootstrap inside the isolated
    odes package so older_paths, comfy_api, and other ComfyUI modules resolve under desktop installs
  • keep the change local to import/bootstrap logic without changing node behavior

Problem

On desktop ComfyUI installs, comfy-env isolation can scan comfyui-sam3 before the ComfyUI core path is available on sys.path. That causes imports like older_paths to fail during metadata scan, so the node registers 0 nodes even though dependencies are installed.

Validation

  • reproduced the failure locally from a desktop ComfyUI installation layout
  • verified the patched package imports successfully through
    egister_nodes()
  • confirmed local registration reports 15 SAM3 nodes after the fix

@colorrin
Copy link
Copy Markdown

Hopefully this gets merged soon, is there any temporary workaround?

@JoeGaffney
Copy link
Copy Markdown

this comfy-env package seems very problematic rebuilding a unique enviroment again from what it looks like when quickly scaning the code is also loading custom wheels the author made

@artokun
Copy link
Copy Markdown
Author

artokun commented Apr 16, 2026

@colorrin you can use my fork from this PR in the meantime until it gets patched, that's what I am using

@colorrin
Copy link
Copy Markdown

Thanks a lot @artokun, it worked perfectly

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.

3 participants