Nodes/ComfyUI-InferenceTimeScaling/Inference Time Scaler
ComfyUI Node

Inference Time Scaler

Performs inference-time optimization to find the best image matching your text prompt. Supports two search algorithms: 1. Random Search: Generates multiple images with different random seeds 2. Zero-Order Search: Performs gradient-free local optimization Uses an ensemble of AI verifiers (CLIP, ImageReward, Qwen-VL) to score and rank the generated images. Returns the best image, a grid of top-k results, and detailed scoring information.

By YRIKKA·Created about a year ago·Updated about a year ago· 23
Inference Time Scaler
  • model
  • vae
  • positive
  • negative
  • latent_image
  • loaded_clip_score_verifier
  • loaded_image_reward_verifier
  • loaded_qwen_verifier
  • Best Image
  • Top-k Grid
  • Top-k Score(s)
seed0
steps20
cfg1.0
sampler_name
scheduler
denoise1.00
search_algorithmrandom
text_prompt_to_compare
search_rounds5
view_top_k3
num_neighbors4
lambda_threshold0.90
CategoryInferenceTimeScaling

Inputs (20)

NameTypeDefaultDescription
modelMODELDenoising model.
vaeVAEVAE model for decoding latents.
seedINT00–18446744073709550000Random seed.
stepsINT201–10000Number of denoising steps to apply during each forward evaluation.
cfgFLOAT1.00–100Classifier-Free Guidance Scale.
sampler_nameCOMBOSampling algorithm to be used during each forward evaluation.
schedulerCOMBONoise removal scheduler.
positiveCONDITIONINGPositive prompt conditioning.
negativeCONDITIONINGNegative prompt conditioning.
latent_imageLATENTLatent image to be denoised.
denoiseFLOAT1.000–1Amount of denoising.
search_algorithmCOMBOrandomSelect the search algorithm: 'random' for standard random search or 'zero-order' for gradient-free local search.
text_prompt_to_compareSTRINGText prompt for verifier(s).
search_roundsINT51–10000Number of search rounds (random seeds for random search, or iterations for zero-order search).
view_top_kINT31–100Return grid view of the top-k images.
num_neighborsINT41–100Number of neighbors to sample per iteration in zero-order search (only used if search_algorithm is 'zero-order').
lambda_thresholdFLOAT0.900–1Perturbation step size for zero-order search (only used if search_algorithm is 'zero-order').
loaded_clip_score_verifieroptCS_VERIFIERHF CLIP model identifier.
loaded_image_reward_verifieroptIR_VERIFIERImageReward model identifier.
loaded_qwen_verifieroptQWN_VERIFIERQwen model identifier.

Outputs (3)

NameTypeDescription
Best ImageIMAGEBest single image, grid of the top-k images, and their scores in JSON.
Top-k GridIMAGE
Top-k Score(s)STRING