ComfyUI Node Runs on cloud

Get Models

Your API script's way to know what models actually exist

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
Get Models
      dumpall models

      Get Models is a dump node, and it's proud of it. No inputs besides a dropdown, no image output, no preview. What it does: writes the current list of model filenames on your system - checkpoints, LoRAs, controlnets, VAEs, you name it - to a JSON file in your output folder. That's it. And if you drive ComfyUI from a script, you'll understand why it exists in about five seconds.

      Here's the problem it solves. When you talk to ComfyUI's API, the checkpoint you want is a string in the JSON payload: "ckpt_name": "dreamshaper_8.safetensors". But where does your script learn that the file is called that? The UI's dropdown list lives in the frontend, not in your code. Get Models hands your script that list as machine-readable JSON so it can validate, generate, or pick model names without a human eyeballing the UI.

      How it works

      The dump dropdown offers fourteen options: all models, or any single category - checkpoints, clip, clip_vision, controlnet, diffusers, embeddings, gligen, hypernetworks, loras, style_models, upscale_models, vae, plus configs.

      Run it with all models and it writes all models.json to your ComfyUI output directory, with one key per model category, each holding the list of filenames ComfyUI currently sees in that folder. Pick a single category and it writes <category>.json with a single list key. The node is marked as an output node, so it shows up even though it returns nothing - it's a side effect, not a data producer.

      Where it fits

      Pair it with the pack's API nodes (like RequestInputs and the "dirty" loaders). A typical flow: your backend runs Get Models once, reads all models.json, offers the user a real dropdown of actual filenames, then sends the chosen name as a string. The dirty loaders exist precisely so a filename arriving as text gets matched against that list instead of being looked up in a UI dropdown.

      Install

      Ships in bmad4ever/comfyui_bmad_nodes. ComfyUI Manager → search comfyui_bmad_nodes, or clone it manually:

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

      Restart after. The pack pulls opencv-python~=4.8.1.78, scikit-image, gray2color, simpleeval; no models to download.

      Gotchas

      The file is a snapshot of when you ran it. Drop a new checkpoint into the folder and the JSON goes stale until you re-run - so regenerate it as part of your automation rather than caching it forever. Also, the filenames come straight from ComfyUI's internal folder lists, so they include whatever relative paths ComfyUI reports (subfolders included); if your script does exact-string matching, compare against this output, not against what you think the path should be.

      CategoryBmad/dump

      Inputs (1)

      NameTypeDefaultDescription
      dumpCOMBOall models14 options: all models, checkpoints, clip, clip_vision, configs, controlnet, +8

      Outputs (0)

      No outputs