Nodes/ComfyUI-aihub-workflow-exposer/AIHub Expose Project Config String
ComfyUI Node

AIHub Expose Project Config String

Read a text value from the project config — model names, file names, settings

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Expose Project Config String
    • STRING
    idstring
    fieldmy-field
    default

    AIHub Expose Project Config String is the text reader among the pack's project-config nodes. It pulls a string out of the current AIHub project's configuration and emits it as a STRING output - which is a bigger deal than it sounds, because in an AIHub workflow a string is how you move around everything that isn't a number or a tensor: model file names, lora names, paths, labels, and text you can feed to prompt inputs or string-selector utilities like the pack's AIHubUtilsLoadModel and AIHubUtilsLoadLora, which take string inputs precisely so they can be fed from stored config.

    The project mechanism is the same as its siblings: a workflow gets a project when its AIHubWorkflowController sets a project_type (and it's not the init workflow), and the client stores project state however it likes - a config.json in a folder, or something more exotic. These nodes read from that client-managed config over the pack's websocket (port 8111). In the bare web UI, no project means you get the default.

    What you set

    • field - the config key, with dots for sublevels. model.current reads {"model": {"current": "sd_xl_base"}}.
    • default - what comes back if the field is missing or empty. Defaults to "". For a model-name field, an empty default usually means a downstream load will fail with a confusing "file not found," so set a real fallback if the field might be absent on first run.
    • id - the protocol field id (alphanumeric, _, -).

    No label or tooltip - the client never renders this for the user; it's a hidden read.

    Why string is the interesting one

    The other three config nodes hand back numbers and booleans; this one hands back state you can act on. The classic setup: the project's init workflow writes the chosen checkpoint into the config with AIHubActionSetProjectConfigString, and every subsequent workflow reads it with this node and feeds it into a string-driven loader - no user-facing model field in sight, no possibility of picking an incompatible model. If your workflows are already talking to each other through a project, this is the glue.

    Install & gotchas

    Standard pack install: ComfyUI Manager → search ComfyUI-aihub-workflow-exposer, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
    

    then restart. No requirements.txt, no model downloads.

    Two gotchas. First, the no-project default trap, same as every config node - a missing project silently yields the default, so build fallbacks that fail loudly. Second, strings are passed through as-is, so watch trailing whitespace and case: "sd_xl_base" and "SD_XL_Base" are different files to a loader. If a load mysteriously fails, check the exact bytes in the config before you blame the node.

    Categoryaihub/expose/config

    Inputs (3)

    NameTypeDefaultDescription
    idSTRINGstringA unique custom id for this workflow.
    fieldSTRINGmy-fieldThe field to expose, use dots for entering sublevels
    defaultSTRINGThe default value of the field

    Outputs (1)

    NameTypeDescription
    STRINGSTRING