ComfyUI Node

Pixiv Browser

Pull your Pixiv bookmarks straight into the graph as images

By wrt122311·Created 4 months ago·Updated 4 months ago· 1
Pixiv Browser
    • images
    artwork_ids

    The name is honest, which is rare. Pixiv Browser opens a full-screen Pixiv explorer right inside ComfyUI - recommendations, rankings, your bookmarks, your bookmarked artists - and when you pick art it downloads the originals and hands them to the rest of the graph as one IMAGE batch. No copy-pasting URLs into a Load Image node, no browser tab, no download folder to forget. It's the sort of node you don't realize you wanted until you've rebuilt the img2img loop around it.

    Why you'd reach for it: if you run anime models - Illustrious, NoobAI, the whole Danbooru-tagged ecosystem - Pixiv is where the reference material actually lives. The usual routine (find art you like, img2img it, test an upscaler against it, gather training images) means juggling a browser and a downloads folder. This collapses all of that into one node. It's a source node - runs no model, generates nothing - that fetches images over the network and drops them into your workflow like any local loader. Think of it as the opposite of the API-wrapper nodes covered in the KB - instead of shipping your prompt to a cloud model, it drags art in.

    How it works

    The frontend registers a "浏览 Pixiv" (Browse Pixiv) button on the node. Click it and a modal pops up with four tabs - Recommended, Ranking, Bookmarks, Artists - each fed by routes the pack mounts on ComfyUI's own server (/pixiv/recommended, /pixiv/ranking, /pixiv/bookmarks, and so on). Thumbnails stream through a built-in proxy that sets the Referer header Pixiv's CDN demands, because i.pximg.net is famously picky about hotlinking. You multi-select across tabs, hit confirm, and the JS writes the chosen artwork IDs into the node's widget.

    On queue, the node looks up each ID's original-size URL through the Pixiv API, downloads the image with the same Referer spoof, and converts it to a float32 tensor. The auth is proper PKCE OAuth via pixivpy3 (the long-running unofficial Pixiv App API client), with the token saved to config.json in the node folder - log in once, never again.

    The input and output that matter

    There's exactly one input: artwork_ids, a STRING that's hidden and written by the modal as comma-separated IDs. You will basically never type it - though a hand-typed comma-separated list of Pixiv artwork IDs works too if you want to skip the browser.

    The single output is images - an IMAGE tensor, float32, values in [0, 1], shape [B, H, W, 3] where B is however many you selected. Wire it into a PreviewImage to just look at things, into VAE Encode's pixels for img2img (start denoise around 0.6–0.8), or into Save Image to bulk-download your picks to ComfyUI/output/.

    One thing the source does that'll bite you: images are resized to match the first selected image's dimensions before stacking. Mix portrait and landscape in one selection and you'll get the squish, so keep a pick same-ratio. Multi-page works also only return page one.

    Installing and logging in

    No model files, no VRAM cost - just two Python deps and a login:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wrt122311/comfyui-pixiv-node.git
    pip install pixivpy3 Pillow
    

    Then restart ComfyUI (you should see [PixivBrowser] Loaded successfully). You can also grab it from ComfyUI Manager by searching "comfyui-pixiv-node". Portable installs should use their own python_embeded\python.exe -m pip install.

    The login is the fiddly part. The recommended route:

    pip install gppt
    gppt login-headless -u [email protected] -p yourpassword
    

    Copy the refresh_token from the output, click the node's button, paste it into the "Refresh Token" tab, and save. There's also a pure OAuth path - complete login in a browser tab and paste back the pixiv://account/login?code=... URL from the address bar. Chrome and Edge won't show that URL without the Pixiv app installed, which is why the README recommends the token route; most people who hit that wall end up there anyway.

    Common issues

    This node looks local but it's really a network client, and that's the biggest trap: if you usually run ComfyUI offline, it's dead on arrival. Pixiv blocks certain regions and IP ranges, so thumbnails failing to load, or a queue error saying "all images failed to download," almost always means your network can't reach pixiv.net / i.pximg.net - which in some countries means a proxy. That's not a node bug; that's Pixiv's geofencing. The other classic gotcha is pasting a truncated auth URL, which the login tab will reject. Fix those two and it just works.

    It's brand-new - single-digit impressions at the time of writing - so expect rough edges and check the repo for updates. MIT-licensed, credentials stay local, no API key to leak. If you live on Pixiv, it's one of those "why didn't anyone do this sooner" nodes.

    Categoryimage/pixiv

    Inputs (1)

    NameTypeDefaultDescription
    artwork_idsSTRING

    Outputs (1)

    NameTypeDescription
    imagesIMAGE