Nodes/BookCoverFinder/BookCoverFinder
ComfyUI Node

BookCoverFinder

Pull Real Book Covers Into ComfyUI, No API Key Required

By weberjc·Created about a year ago·Updated about a year ago· 0
BookCoverFinder
    • IMAGE
    query

    Want a real, actual book cover in your image - the actual edition of Dune, not whatever mush your model invents for the title? That's the entire job of BookCoverFinder. Type a query, it reaches out to OpenLibrary's public search API, grabs the cover of the first matching book, and hands it to your graph as a standard IMAGE tensor. No API key, no signup, no model downloads. It's a one-trick node, but for "put these real books on a desk and have Flux composite them into a scene" it saves you from downloading covers by hand, cropping them, and loading them one at a time.

    How it works

    Under the hood it's almost embarrassingly simple. The node fires a GET at https://openlibrary.org/search.json?q=<your query>, takes the first result in docs, and prefers cover_edition_key (an OLID) when present, falling back to cover_i (a plain cover ID). It then builds a URL like https://covers.openlibrary.org/b/olid/<olid>-M.jpg, downloads it, converts to RGB, normalizes to 0–1 floats, and returns a [1, H, W, C] tensor - the exact shape ComfyUI's IMAGE type expects, so it plugs straight into VAE Encode, any img2img path, or an IPAdapter-style reference workflow.

    The one thing to know: this is a network call at queue time, not a local lookup. OpenLibrary is free and keyless, but it's someone else's server - your graph needs internet and will occasionally just be slow.

    The inputs that matter

    There's exactly one: query (STRING). That's it - no size picker, no edition selector, no batch mode.

    Because the node always takes the first search hit, the query is where you do your work. OpenLibrary's search supports fielded syntax, so use it:

    title:Dune author:Herbert
    title:Neuromancer first_publish_year:1984
    

    A bare "Dune" might match some edition you've never seen; a fielded query pins the exact book. There's no way to browse results and pick a different one, so if the query is sloppy, the cover is a coin flip.

    Output

    One IMAGE out. From there you can VAE-Encode it and img2img it with Flux Dev to drop it onto a shelf or desk, or wire it into a reference-based workflow to keep the cover's artwork intact while your generator builds the scene around it. The covers come in at OpenLibrary's medium (M) size - a few hundred pixels. Fine as a compositing reference, not print-quality texture. That's the tradeoff of a node this small.

    Install

    Either route works:

    • ComfyUI Manager → search BookCoverFinder → Install → restart ComfyUI.
    • Or manually:
      cd ComfyUI/custom_nodes
      git clone https://github.com/weberjc/book-cover-finder-comfy
      
      then restart.

    There's nothing else to download. The pack declares no pip dependencies beyond what any ComfyUI install already ships (requests, Pillow, torch, numpy), and it pulls no model files. It's about the lightest custom node install you'll ever do.

    Where people get burned

    The no-results path is a genuine trap. If OpenLibrary finds nothing (or the top hit has no cover), the node prints a message to your console and returns torch.zeros(2, 2, 100, 100, 3) - a malformed black tensor with five dimensions instead of the [1, H, W, C] downstream nodes expect. Your graph will error out or feed garbage downstream. If that happens, check the console, and be more specific with your query. And expect the occasional miss: OpenLibrary is a volunteer catalog, and obscure books genuinely lack covers. Be honest with yourself about the expectations here - it's a thin utility node, the kind you slot in for one scene type, not a workflow backbone. For that one job it's genuinely handy.

    Categorybooks

    Inputs (1)

    NameTypeDefaultDescription
    querySTRING

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE