Nodes/Bjornulf_custom_nodes/๐Ÿ“ฅ๐Ÿ•‘๐Ÿค– Load CivitAI Links
ComfyUI Node

๐Ÿ“ฅ๐Ÿ•‘๐Ÿค– Load CivitAI Links

Load CivitAI Links (Bjornulf_custom_nodes) โ€” ComfyUI Node Guide

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
๐Ÿ“ฅ๐Ÿ•‘๐Ÿค– Load CivitAI Links
    • images
    • status_info
    • LIST_style
    โ—„api_tokenโ–บ
    โ—„links_file_pathโ–บ
    โ—„selected_fileNot selectedโ–บ
    โ—„direct_linksโ–บ
    โ—„auto_savefalseโ–บ

    This one's the second half of a two-step workflow, and it won't make much sense on its own - so let's set up the first half before getting into it. Bjornulf's pack can generate images through CivitAI's own on-site generation API. The author's own words on that API: "CivitAI can be particularly slow." Rather than make you sit and stare at a stalled node, the companion Style Selector node has a DO_NOT_WAIT option - fire off the generation request, don't block, and write the resulting links to a text file in ComfyUI/Bjornulf/civitai_links/ instead. Load CivitAI Links is what you come back to later to actually pull those finished images down.

    How it works

    You (or the upstream node) point it at a links file that was written earlier, and it fetches the images those links point to. It's less a "loader" in the ComfyUI-standard sense and more a retrieval step for an async job you kicked off previously - the CivitAI-side generation already happened; this node is just catching up on the result.

    Inputs and outputs

    api_token is your CivitAI API token (get one from your account settings on civitai.com) - required, since this is hitting CivitAI's API on your behalf. links_file_path and selected_file work together: selected_file is a dropdown auto-populated from whatever files already exist in the links folder, so once you've generated a few batches you can just pick one from the list instead of typing a path. direct_links is the escape hatch - a multiline field where you can paste links straight in in place of using a saved file at all. The optional auto_save toggle, when the upstream generation used a style-based LIST, organizes the pulled images into folders per style automatically (the README's example: ./ComfyUI/output/civitai_autosave/Cinematic_photography/).

    Outputs: images (the actual IMAGE data), status_info (a text summary of what happened - worth wiring to a Show node while you're debugging), and LIST_style, a list of the style values associated with each recovered image - mainly there to drive that auto_save folder organization.

    Installing it

    Standard pack install: ComfyUI Manager, search "Bjornulf_custom_nodes," or cd ComfyUI/custom_nodes && git clone https://github.com/justUmen/Bjornulf_custom_nodes and restart. This node's dependency needs are covered by the pack's own requirements.txt (it uses civitai-py under the hood, which is one of the packages the README lists among things to install).

    Common issues & troubleshooting

    Be honest with yourself about where this node sits in the pack's maturity curve: it depends on the Style Selector node, which the README itself still labels part "Coming soon" even as of the current version. That means the CivitAI generation + links pipeline is one of the least settled corners of an already fast-moving pack - expect rougher edges here than in the older, more battle-tested nodes.

    A missing or wrong api_token is the most common wall you'll hit - CivitAI's API requires it for generation and, depending on the endpoint, for retrieval too. If status_info comes back with an auth-flavored error, that's the first thing to check. And if a links file shows up empty in selected_file's dropdown, remember the file only gets written when the upstream Style Selector node actually ran with DO_NOT_WAIT and a links_file set - a normal (blocking) generation run never produces one.

    CategoryCivitai

    Inputs (5)

    NameTypeDefaultDescription
    api_tokenSTRINGโ€”
    links_file_pathSTRINGโ€”
    selected_fileCOMBONot selected1 options: Not selected
    direct_linksSTRINGโ€”
    auto_saveoptBOOLEANfalseโ€”

    Outputs (3)

    NameTypeDescription
    imagesIMAGEโ€”
    status_infoSTRINGโ€”
    LIST_styleSTRINGโ€”