Nodes/CRT-Nodes/File Batch Prompt Scheduler KREA2 (CRT)
ComfyUI Node

File Batch Prompt Scheduler KREA2 (CRT)

Run a whole prompt folder through Krea 2 with phrase weights — one node, CFG 1.0

By PGCRT·Created 2 years ago·Updated 13 days ago· 132
File Batch Prompt Scheduler KREA2 (CRT)
  • model
  • clip
  • model
  • conditioning
  • batch_count
  • prompts_text
folder_path
batch_count1
seed0
file_extension.txt
max_words0
weighted_phrases
strength1.00
crawl_subfoldersfalse
print_indextrue
Batch Randomizefalse

This is the node to reach for when you've got a folder full of prompt files and you want to push all of them through Krea 2 with a consistent set of emphasis rules. It's two tools welded into one: the pack's file-based batch scheduler, plus the KREA2 per-token prompt-weighting trick adapted from Kijai's KJNodes. On one run it reads a batch of .txt prompts, applies your shared phrase weights to every one, and returns a patched model plus its conditioning.

Krea 2 is the open-weight 12B from Krea, a Qwen-3-VL-based model that - like most 2026 generation models - was guidance-distilled and wants CFG 1.0. That's not a suggestion; the node's own description says it, and the tooltips repeat it. At CFG 1 ComfyUI doesn't even compute a negative pass, so it's a speed win too. Get this wrong and you're fighting the model.

How it works

The scheduling half is straightforward: it scans folder_path for files matching file_extension (default .txt), and uses seed to pick a starting point, selecting batch_count prompts from there (wrapping around the file list). With Batch Randomize on, it shuffles without repeats across incrementing seeds - every file gets presented once before a new cycle starts, which is the behavior you want for fair sweep runs.

The weighting half is the clever bit. Krea 2's Qwen tokenizer wraps your text in a chat template, and the node finds the user-prompt span inside those tokens, locates every occurrence of your weighted phrases, and patches the model's attention so those tokens pull harder (or less) - a per-token key/value bias instead of the old-school "just repeat the word" approach. It's the same per-token weighting technique Krea's own pipeline uses, implemented locally against the open weights.

The inputs that matter

Only a few, honestly:

  • weighted_phrases - the whole point. Format (phrase:1.5) to emphasize, (phrase:-1) to suppress. The phrase must actually appear in the prompt or it silently does nothing.
  • strength (default 1.0, 0-4) - global multiplier on the whole weighting effect.
  • folder_path + seed + batch_count - which files, where to start, how many.
  • Batch Randomize - the one optional input, and the one you'll flip on for sweep runs.

Outputs

Four, and they map cleanly onto a KREA2 pipeline:

  • model - the model patched with the KREA2 attention weighting. This goes to your KSampler.
  • conditioning - the batch's encoded conditioning, one prompt per batch index.
  • batch_count - an INT telling downstream nodes (like a batch KSampler) how many items to iterate.
  • prompts_text - the raw selected prompts as a string, handy for logging or a preview node.

A batch sampler, a KSampler Batch from this pack, or the core's batch machinery consumes batch_count and the batch-shaped conditioning. CFG stays at 1.0, sampler and steps are whatever you run Krea 2 with.

Install

Standard pack install. ComfyUI Manager → search CRT-Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-Nodes
pip install -r requirements.txt

Restart ComfyUI. The pack's requirements file is heavy (opencv, transformers, audio stuff) because the pack spans many domains, but this node runs on ComfyUI's bundled deps. It's marked experimental in the source, so expect occasional sharp edges rather than a maintained API.

CategoryCRT/Conditioning

Inputs (12)

NameTypeDefaultDescription
modelMODEL
clipCLIP
folder_pathSTRINGFolder containing prompt text files.
batch_countINT11–64
seedINT00–18446744073709550000
file_extensionSTRING.txt
max_wordsINT0
weighted_phrasesSTRINGShared KREA2 weights applied to every selected prompt. Use (phrase:-1) to suppress or (phrase:1.5) to emphasize. The phrase must occur in the prompt.
strengthFLOAT1.000–4Global multiplier for the shared weighting effect. Use sampler CFG 1.0 with KREA2.
crawl_subfoldersBOOLEANfalse
print_indexBOOLEANtrue
Batch RandomizeoptBOOLEANfalseShuffle without repeats across incrementing seeds. Every file is presented before a new cycle begins.

Outputs (4)

NameTypeDescription
modelMODEL
conditioningCONDITIONING
batch_countINT
prompts_textSTRING