Files
olivv-cs-ComfyUI-FunPack/modules/_core.py
T
digital-garbage f8dd49d04f feat: FunPackLoadMedia -- load a media-library file into the graph as an image
The bridge piece B and C (resolution source, reference images) both need:
Media bin picks have no way into a ComfyUI graph today. One node, media_id
in, IMAGE out, backed by core/media.py's existing store.

Also fixes a real .gitignore bug found along the way: a bare "media/"
pattern matched modules/media/ (this node's own source) as well as the
intended root-level user-data directory. Rooted both media/ and projects/.
2026-09-11 11:37:23 +03:00

19 lines
1.1 KiB
Python

"""How a module reaches core, in both contexts, decided once.
A module cannot simply `import core`. Inside ComfyUI the pack is imported by file
location, so `core` is only reachable beneath the pack's own package; under the
tests and the dev server the repo root IS on sys.path, so it is top-level. A
static relative import gets one of those right and breaks the other.
Every module therefore imports core THROUGH here -- `from ..._core import traits`
-- and this file holds the only place that has to know about the difference. The
leading underscore keeps it out of the module scan.
"""
try: # root on sys.path: tests, dev server
from core import chain, contract, log, media, patching, registry, relations, run, schema, traits
except ImportError: # inside ComfyUI: a subpackage of the pack
from ..core import chain, contract, log, media, patching, registry, relations, run, schema, traits
__all__ = ["chain", "contract", "log", "media", "patching", "registry", "relations", "run", "schema", "traits"]