ComfyUI Node

RetroArch Player

Play SNES inside ComfyUI while your queue burns

By WASasquatch·Created 8 months ago·Updated 8 months ago· 2
RetroArch Player

      An entire retro console in a node

      This is the most honest use of your GPU's spare VRAM in the whole ecosystem. ComfyRetroArchPlayer ("RetroArch Player") embeds the hosted RetroArch web player from web.libretro.com directly inside a ComfyUI node, so you can boot up NES, SNES, Genesis, PlayStation, and a few dozen more cores without leaving your workflow. Stuck on a 20-minute render? Congratulations, you now have a game console sitting in your graph.

      It comes from WASasquatch, the author of WAS Node Suite - one of the big general-purpose utility packs people install for image post-processing. So it's a serious dev's obvious joke, filed under the WAS/Play category, and it knows it. It has zero inputs, zero outputs, and it never touches your generation. That's the point, not a bug.

      How it works

      The Python side is a stub. The class declares no required inputs, no return types, and run() just returns (). Every bit of the magic lives in web/comfy_retroarch_player.js, which is what makes this worth describing - most "player" nodes still pass data through the graph, this one doesn't.

      On every draw frame, the extension creates an <iframe> in an absolutely-positioned overlay div, sizes it to exactly match the node's rectangle on the canvas (inset a few pixels so it looks embedded), and repositions it as you pan, zoom, or resize. It carries a sandbox attribute allowing scripts, forms, popups, downloads, and pointer-lock, and it cleans up orphaned iframes once a second so deleted nodes don't leave ghost players floating over your graph. The iframe points at web.libretro.com - the hosted player, not a local RetroArch install - which means it requires internet access and does all its emulation in your browser's JS.

      Because the player is cross-origin, the iframe can't reach into it, so RetroArch's fullscreen button generally won't work. Play it inside the node or don't play it fullscreen; those are the options.

      The inputs that matter

      None. Really. There's no seed, no resolution, no toggle. You add the node, resize it to something playable (the extension forces a minimum of roughly 980×600), and the RetroArch menu appears. The only "workflow wiring" that exists is pointing your browser at it.

      Install

      Two boring, normal ways:

      cd ComfyUI/custom_nodes
      git clone https://github.com/WASasquatch/ComfyUI_RetroArch_Player
      

      Or open ComfyUI Manager and search "ComfyUI_RetroArch_Player". Restart ComfyUI. There are no Python dependencies (requirements.txt is empty) and no model files to download - the emulator ships in the browser. Which means if the repo breaks, the fix is almost always updating the JS file in web/, not reinstalling anything.

      Common gotchas

      • Blank or missing iframe - open DevTools Console and confirm https://web.libretro.com/ actually loads in your browser. If your network blocks it, you get nothing; there's no fallback.
      • UI looks stale after an update - hard refresh with Ctrl+F5; the extension caches aggressively.
      • Iframe misaligned during zoom/pan - you're running an old copy of web/comfy_retroarch_player.js, or you have multiple copies of the pack installed in different custom_nodes folders. Keep exactly one.
      • Uploaded a ROM and it vanished - after "Add Content", go to Load Content → Start Directory, pick your uploaded ROM, and the player lists compatible cores. That's the step everyone skips.

      You also need to bring your own ROMs. This node doesn't ship any games, and you should only load files you have the rights to - the web player just plays what you hand it.

      Is it essential? No. Is it the only node whose "output" you can beat in an afternoon? Also no, unless you're bad at Super Metroid like the rest of us. For a fun, free distraction while your queue grinds, it's hard to beat.

      CategoryWAS/Play

      Inputs (0)

      No inputs

      Outputs (0)

      No outputs