Nodes/ComfyUI_doubao_seed/连环画浏览器预览
ComfyUI Node

连环画浏览器预览

Open the finished comic in your real browser

By xuchenxu168·Created 11 months ago·Updated 9 months ago· 19
连环画浏览器预览
    • file_url
    • status
    viewer_path
    auto_openfalse

    The end of the line for the comic-book workflow. 连环画浏览器预览 ("browser preview") takes the HTML file that ComicHTMLViewerNode produced and opens it in your system's default browser - the full-screen, print-able, share-able reading experience that a little iframe in ComfyUI can't match. It's the last node in the chain, the one you run when you're done iterating and actually want to read the thing.

    How it works

    You feed it viewer_path (the path from ComicHTMLViewerNode), and it verifies the file exists, converts it to a file:// URL, and - if you want - calls Python's webbrowser.open() to pop it open in your default browser. The front-end JavaScript also adds a "🌐 打开浏览器" button right on the node, so you can open the current file without re-running the workflow.

    auto_open defaults to False, which is a deliberate choice and the right one: if it auto-opened on every queue, your browser would spawn a tab on every run. Leave it off, and click the button when you want to look. That split - run the workflow, then open on demand - is also why the node always executes (IS_CHANGED returns a changing value), so the button always has a fresh path to work with.

    Inputs and outputs

    • viewer_path (required) - the HTML file path, normally wired from ComicHTMLViewerNode.viewer_path.
    • auto_open (optional, default False) - set true if you do want the browser to open automatically every run.

    Outputs are file_url (the file:// URL - handy if you want to log it or hand it elsewhere) and status (a string saying whether it opened, with the path and URL, or a clear error if the file wasn't found).

    Install & setup

    Part of the same pack - install once, use all of it:

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

    Restart ComfyUI. No API key, no models, nothing but a file path.

    Gotchas

    This only works on the machine running ComfyUI - webbrowser.open() opens a browser on the server's desktop, not yours. If you're running ComfyUI on a headless box or a remote VPS, the file URL still comes back (and you can fetch it in your own browser), but auto-open will silently fail or do nothing visible. The status output will tell you as much. Otherwise the main annoyance is the timestamped filenames piling up in web/exports - every viewer run writes a new file, so sweep that folder occasionally or your comic collection becomes an archeological dig.

    CategoryKen-Chen/Doubao

    Inputs (2)

    NameTypeDefaultDescription
    viewer_pathSTRING
    auto_openoptBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    file_urlSTRING
    statusSTRING