Nodes/ComfyUI_Dados_Nodes/Pinterest Image Node
ComfyUI Node

Pinterest Image Node

The Pinterest scraper node that feeds reference boards into your graph

By DadoIrie·Created 2 years ago·Updated a day ago· 10
Pinterest Image Node
    • image
    • configs
    • data
    node_configs{}
    pinterest_data{}
    username

    Pinterest is a goldmine of reference material - moodboards, pose libraries, character inspiration - and it is a pain to get out of the browser and into a ComfyUI workflow. The Pinterest Image Node is the pack's attempt to fix that: you give it a Pinterest username, it pulls that user's boards (and their sections), and it feeds the images into your graph as a selectable pool you can draw from. It's ambitious, it's fiddly, and when it works it's genuinely neat.

    How it works

    Under the hood it uses py3pin, a third-party Pinterest API client, to log in as the given username and crawl boards. Here's the flow:

    1. You enter a username. The node checks the user exists, then fetches their board list.
    2. The pack's web UI turns that into dropdowns - pick a board, optionally a section within it, and how you want images selected.
    3. On each run, the node pulls image URLs (cached to disk as *_boards.json under the pack's user data dir), picks one per your selection strategy, downloads it, and emits it as an IMAGE tensor.

    The three inputs are all JSON-ish: username (the Pinterest account), node_configs (a JSON string holding your UI selections - board, section, selection mode, resize), and pinterest_data (the cached board data). Outputs are image (IMAGE), plus configs and data as JSON for debugging. The node is marked as an output node, so it sits at the end of a branch feeding whatever consumes the image.

    Selection strategies matter for control: chaotic draw is fully random each run, fixed keeps the last image unless you change board/section, and circular shuffle walks through the pool without repeats. If your goal is "different reference image every run," chaotic draw is the one. If you want "pick once, keep it," that's fixed.

    Install - read this before anything else

    The py3pin dependency is not in requirements.txt; the pack's prestartup_script.py installs it on first launch from a git URL (git+https://github.com/GgAaYyAaNn/py3-pinterest.git) if it isn't already present. So on first startup you'll see it pip-installing from source - that needs network access and can take a minute. The standard install otherwise applies:

    cd ComfyUI/custom_nodes
    git clone https://github.com/dadoirie/ComfyUI_Dados_Nodes.git
    cd ComfyUI_Dados_Nodes
    pip install -r requirements.txt
    

    The honest warning

    This is the most fragile node in the pack. Pinterest actively resists scraping: it changes its endpoints, rate-limits, and blocks suspicious sessions. py3pin is a scraping client, not an official API, so the whole thing can break when Pinterest sneezes - and the pack's own codebase history shows this node has been through "WIP - broken" phases before. Expect flakiness. If the node won't fetch boards, check the username is public and spelled exactly right, and remember it's caching to disk - a stale cache can show old boards. For serious reference-pool work, consider whether a folder of downloaded images plus a random-image loader is more reliable. But for pulling a specific Pinterest board's look directly into a workflow, this is the node that does it.

    CategoryDado's Nodes

    Inputs (3)

    NameTypeDefaultDescription
    node_configsSTRING{}
    pinterest_dataSTRING{}
    usernameSTRING

    Outputs (3)

    NameTypeDescription
    imageIMAGE
    configsJSON
    dataJSON