ComfyUI Node

Save Mojo

Bottle the whole generation so you can refine it later

By Hellrunner2k·Created 2 years ago·Updated about a year ago· 2
Save Mojo
  • latent
  • Positive_Mojo
  • Negative_Mojo
    Activetrue
    Output_PathHellkars/Mojos
    NameShareMy
    Overridetrue
    Info

    Save Mojo is the write side of Hellrunner's "mojo" format, and mojo is worth understanding because it's genuinely different from saving an image. A .mojo file is a safetensors bundle that contains the latent and the encoded conditioning - the tokens, the masks, the guidance and resolution settings - but not the prompt text and not the model. The README's framing is the best one: it's an "interflow exchange format geared towards lossless upscaling and refinement," for "sharing your prompt without sharing your prompt." Save one at the end of a generation and you can load it later, feed it into a different model or an upscale chain, and refine without re-typing anything.

    The inputs that matter

    • latent - the latent from your sampler (or an image VAE-encoded into a latent). This is what the file recreates when loaded.
    • Positive_Mojo / Negative_Mojo - the Mojo flows from Mojo Maker (or Adjust Mojo). These carry the per-encoder tokens, masks and settings that produced your image. Both are required inputs.
    • Info - a free-text field, multiline. The intended use is on the tooltip: note the model, the LoRAs, and which VAE decodes the latent. It's stored in the file and printed back by the loader, so it's your own field notes for later.
    • Active - on/off switch to bypass saving in complex flows.
    • Output_Path - subfolder under output/, default Hellkars/Mojos.
    • Name - filename (default "ShareMy", minus the extension).
    • Override - on (default) overwrites the same name; off creates numbered unique files instead.

    How it works

    energize walks the Mojo flows and flattens them into a safetensors dictionary: the latent under Lnt, each positive/negative conditioning slot as Pos.N.Tik.M.Encoder entries holding the tokenized text as JSON-in-a-tensor, masks as real tensors, and the settings/Info as JSON. Then it saves the whole thing as Name.mojo. If the file already exists it bumps a Ver counter and overwrites, so you can see a mojo's iteration history when you load it. The format is deliberately lightweight - it's conditioning data, not a model, so files are small.

    How it fits

    The lifecycle is: Mojo Maker → KSampler → Save Mojo. Down the road, Mojo Loader reads the file back, hands you the latent for VAE decode or further sampling, and the conditioning to re-encode against a different clip if you want. The author's own claim is that a mojo made on SDXL can be loaded and regenerated with AuraFlow or Flux - the loader maps tokens to whatever encoders your new model actually has, and skips what doesn't match.

    Installing it

    One of the pack's twelve nodes. ComfyUI Manager → search "Hellrunner's Magical Nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Hellrunner2k/ComfyUI-HellrunnersMagicalNodes.git
    

    Restart ComfyUI. No extra dependencies - safetensors ships with ComfyUI.

    Troubleshooting

    • Saved file is missing your prompt? By design. The prompt is encoded into tokens, not stored as text. That's the "share without sharing" point, but it also means the file is only useful with a compatible clip.
    • Overwrite surprising you? Override defaults to on, so the same Name clobbers the previous file. Flip Override off for versioned outputs.
    • Nothing saved at all? Check Active, and remember both Positive_Mojo and Negative_Mojo are required inputs - an unconnected wire makes the node fail before it saves.
    • Note that the default Output_Path (Hellkars/Mojos) is where Mojo Loader also looks by default, which keeps save/load paired with zero config.
    CategoryHellrunner's/Mojo

    Inputs (8)

    NameTypeDefaultDescription
    ActiveBOOLEANtrueBoolean On/Off Switch for better integration in complex comfy-flows
    Output_PathSTRINGHellkars/MojosSubfolder Path into "output"
    NameSTRINGShareMyMojo File Name
    OverrideBOOLEANtrueSaves over the exact file name on "True/On" or creates numbered unique files on "False/Off"
    latentLATENTLatents to Mojo file. Provide decoding info.
    Positive_MojoMOJOPositive Mojo Flow
    Negative_MojoMOJONegative Mojo Flow
    InfoSTRINGExtra Mojo information. Provide models used. With what VAE to decode the latent... and such

    Outputs (0)

    No outputs