ComfyUI Node

GR QueueTube

Let Your YouTube Live Chat Queue Images on Your Own GPU

By GraftingRayman·Created 2 years ago·Updated 2 years ago· 0
GR QueueTube
    • combined_prompts
    • seed
    positive,
    seed1

    This is the node for a very specific dream: you're streaming a ComfyUI session on YouTube, and your viewers type PROMPT: a cat in a hat wearing a blue jersey in live chat - and it generates on your machine, right in front of them. GR QueueTube is the bridge that makes that happen. The author's framing is a members-only feature with a second screen showing off what your members created, but it works fine for an open stream too, if you're braver than you should be.

    It's not a generator and it calls no API for the images. The name lies a little: the only API involved is Google's (to read the chat), and that one costs you a few thousand free units a day, not money. Everything else runs locally.

    How it works

    QueueTube ships as two halves that never actually talk to each other over a socket. A separate script, YTChatListen.py, authenticates to the YouTube Data API v3, finds your active live broadcast, and polls its live chat every 30 seconds. Messages that start with PROMPT: get stripped of the prefix, screened against nsfwwords.txt, and saved as numbered files (00001_prompt.txt, 00002_prompt.txt...) in a Chat/<date>/ folder. Everything else in chat is logged to log/<date>.log.

    The GR QueueTube node does the other half: it watches that same folder. Here's the quirk that will trip you up - the seed input is not a seed, it's an index. Set seed to 3 and the node reads 00003_prompt.txt from today's folder, appends your positive text after it, and hands the combined string to the sampler. Want the next viewer prompt? Bump the seed. That's the whole queueing system: numbered files on disk, and the seed is your place in line.

    The inputs and outputs that matter

    • positive (STRING, multiline) - your base prompt. Whatever you put here gets appended after the viewer's text, so it's the right spot for your style tags, quality keywords, and model-specific boilerplate. The viewer's words lead, yours follow.
    • seed (INT, 1–99999) - as above, the prompt file to load, zero-padded to five digits.

    Outputs: combined_prompts (STRING) - wire it into your CLIP Text Encode positive - and seed (INT), which just echoes the index back. Note the timeout trap in the code: if the file for your seed doesn't appear within 30 seconds, the node doesn't error - it rolls the seed back by 2 and returns a hardcoded "serene village" fallback prompt. Confusing output on your screen means you asked for a prompt that hasn't been written yet.

    Installing it

    Via ComfyUI Manager, search ComfyUI QueueTube and install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GraftingRayman/ComfyUI_QueueTube
    

    then restart ComfyUI. The node itself needs nothing extra, but the repo ships no requirements.txt, so the chat script won't run until you install its deps yourself:

    pip install google-auth-oauthlib google-api-python-client
    

    The README's remaining setup: put your Google OAuth desktop-app client_secrets.json (from a Cloud project with the YouTube Data API v3 enabled) in the pack folder, and edit the hardcoded Windows path in GRQueueTube.py (base_folder) to point at the pack's Chat folder. Yes, it's hardcoded, and yes, the shipped value still says ComfyUI_GRTest - change it or nothing works.

    The gotchas that will actually bite you

    • API quota. That 30-second poll interval in YTChatListen.py is deliberate. The YouTube Data API gives you 10,000 units a day; dropping time.sleep(30) lower burns through them in an hour. The author tells you not to touch it - believe him.
    • The NSFW filter is not a safety system. nsfwwords.txt is a comma-separated blocklist that's trivial to bypass, and the README says as much. If you stream open to the public, plan to actually read chat, or gate it behind membership.
    • It's Windows-flavored. Hardcoded paths, a .bat launcher, nothing cross-platform-tested. It'll run on Linux, but expect to tidy up paths yourself.
    • You must run the chat script before the node is useful. The node is a file watcher, not a poller that starts anything.

    Fun for a members-only channel, fiddly for anything else. Go in expecting a thin, unpolished bridge - because that's exactly what it is - and you'll have a stream nobody else at your skill level is running.

    CategoryGraftingRayman/YouTube

    Inputs (2)

    NameTypeDefaultDescription
    positiveSTRING,
    seedINT11–99999

    Outputs (2)

    NameTypeDescription
    combined_promptsSTRING
    seedINT