Nodes/ComfyUI-MaxedOut/LoadLatents_FromFolder_WithParams
ComfyUI Node

LoadLatents_FromFolder_WithParams

The batch latent loader that remembers what your Wan run used

By Maxed-Out-99·Created about a year ago·Updated 21 days ago· 9
LoadLatents_FromFolder_WithParams
    • shift
    • positive
    • negative
    • samples
    • steps
    • cfg
    • sampler_name
    • scheduler
    • end_at_step
    • filename_prefix
    • trim_latent
    subfolder

    This is the batch loader from Maxed Out's latent save/load family, and it's aimed squarely at the Wan 2.2 two-stage workflow: run a whole folder of high-noise starts, then finish only the ones worth keeping. The trick that makes it useful isn't loading the tensors - ComfyUI has a stock latent loader - it's that every file carries its own sampler settings, prompts, and seed along with it, so your second pass automatically matches the first.

    Wan 2.2 splits denoising between a high-noise model and a low-noise refiner, which is great for quality and awkward for iteration. The community answer is to draft many starts cheaply, save the promising ones, and only run the expensive refinement on those. This node is the "load them all back" half of that loop.

    How it works

    The pack's Save Latent nodes write .latent safetensors files under ComfyUI/input/latents/, embedding the source workflow and KSampler parameters as metadata. This folder loader scans the subfolder you pick, reads every file, and returns one list per output - a list of latents and the matching list of steps, CFG, sampler, scheduler, and prompt text. The "WithParams" in the name is literal: the parameters come back with the samples.

    The inputs and outputs that matter

    Just one input: subfolder, a dropdown of folders under input/latents. The outputs are all lists:

    • samples - the LATENTs to feed your sampler.
    • positive / negative - prompt text, one string per latent (this is the text-prompt flavor of the loader; the VACE 2.2 variant returns CONDITIONING instead).
    • steps, cfg, sampler_name, scheduler, end_at_step, shift - the saved sampler settings, so your finishing pass matches the draft pass.
    • filename_prefix - lets you re-save results with the same name family.

    Feed the lists into a loop or batching node and it turns "finish the four good ones" into a single queued run.

    Installing it

    It's part of the ComfyUI-MaxedOut pack. In ComfyUI Manager search Maxed Out and install, or:

    cd ComfyUI\custom_nodes
    git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut.git
    

    Restart ComfyUI. There's no extra dependency to satisfy - the pack has no requirements.txt, and no models get downloaded for this.

    One honest caveat

    Check the dates on these pages before you build a workflow around a specific name. Maxed Out renamed this family of latent nodes as the pack evolved, and the older keys are kept around mainly so saved workflows still load. The VACE 2.2 variants are the newer flavor; if you're starting fresh and your model is Wan 2.2, that's the one to reach for. Either way, the loader only works well on latents written by the pack's own Save Latent nodes - that's where the parameter metadata comes from.

    CategoryMXD/Latents

    Inputs (1)

    NameTypeDefaultDescription
    subfolderCOMBO1 options:

    Outputs (11)

    NameTypeDescription
    shiftFLOAT
    positiveCONDITIONING
    negativeCONDITIONING
    samplesLATENT
    stepsINT
    cfgFLOAT
    sampler_nameeuler,euler_cfg_pp,euler_ancestral,euler_ancestral_cfg_pp,heun,heunpp2,exp_heun_2_x0,exp_heun_2_x0_sde,dpm_2,dpm_2_ancestral,lms,dpm_fast,dpm_adaptive,dpmpp_2s_ancestral,dpmpp_2s_ancestral_cfg_pp,dpmpp_sde,dpmpp_sde_gpu,dpmpp_2m,dpmpp_2m_cfg_pp,dpmpp_2m_sde,dpmpp_2m_sde_gpu,dpmpp_2m_sde_heun,dpmpp_2m_sde_heun_gpu,dpmpp_3m_sde,dpmpp_3m_sde_gpu,ddpm,lcm,ipndm,ipndm_v,deis,res_multistep,res_multistep_cfg_pp,res_multistep_ancestral,res_multistep_ancestral_cfg_pp,gradient_estimation,gradient_estimation_cfg_pp,er_sde,seeds_2,seeds_3,sa_solver,sa_solver_pece,ddim,uni_pc,uni_pc_bh2
    schedulersimple,sgm_uniform,karras,exponential,ddim_uniform,beta,normal,linear_quadratic,kl_optimal
    end_at_stepINT
    filename_prefixSTRING
    trim_latentINT