8.7 KiB
FunPack Video Refiner
This node analyzes the positive conditioning produced by your text encoder, tracks your feedback over time, and nudges the conditioning toward directions that should score higher in future generations. It also has optional sigma and latent refinement paths for video workflows.
Parameters
positive_conditioning: Conditioning to refine. Place this node after your text encoder and before the downstream video conditioning node.
mode: Tokenizer mode used for prompt analysis. Use ltx2 for LTX-style workflows and wan for Wan workflows.
rating: Categorical feedback for the previously generated result:
I like it: The video fully matches the request, or is very close.Missing details: The video is visually solid and the main concept is present, but requested details were ignored or changed.Missing concept: The video is visually solid, but the requested concept and details are absent.Missing quality: The video may be visually pleasant, but anatomy, scene construction, concept, and details are not acceptable.I don't like it: The output is low quality, does not represent the requested concept, and ignores details.-Just forget it-: Ignore this run entirely. Use this for sampling errors, broken references, or any result that should not affect future refinement. It skips learning updates and clears any queued feedback question.
Older numeric workflows are still understood internally: 9-10 maps to I like it, 7-8 to Missing details, 5-6 to Missing concept, 3-4 to Missing quality, and 1-2 to I don't like it.
refinement_key: Name of the refinement session. The node stores its learned refinement data under this key so you can continue training the same style later.
scheduler_mode: Learning behavior preset. original keeps the legacy behavior, while accurate and aggressive adjust how strongly the node updates the refinement.
positive_prompt: Optional prompt text used for token analysis and concept-level feedback.
If you want the model to preserve speech or spoken lines, wrap that text in " or “ ”. If you want a non-speech phrase to be treated as one whole phrase, wrap it in backslashes like \a woman holds his drawings in her hands\. Protected phrases are treated as one unit during prompt analysis, so dialogue like "You should go for it, young man." stays intact and a phrase like \She calls him in.\ is kept whole instead of being reduced to a few "important" words. If speech or phrase-level text is not wrapped this way, common words inside it can still be treated as low-value prompt words and may be omitted or ignored.
sigmas: Optional input sigma schedule to co-refine alongside the conditioning. When connected, the node preserves the first and last sigma exactly and only adjusts the middle values.
sigma_strength: Preset strength for sigma refinement. off disables sigma changes, while subtle, medium, strong, and max allow progressively larger movement of the middle sigma values.
reset_session: If enabled, clears the saved training history for the selected refinement key and starts a fresh session.
unlimited_history: If enabled, disables history pruning.
seed: Seed used for exploration behavior during refinement.
feedback_enabled: If enabled, the node can return a concept-focused feedback question alongside the refined conditioning.
feedback_rating: Answer to the queued feedback question on its own 1 to 6 scale. The feedback_question output includes the exact legend to use. Most questions tune presence, priority, balance, fidelity, stability, or preference. The refiner can also ask a category-discovery question for uncertain word groups: 1=general, 2=concept, 3=style, 4=quality, 5=character, 6=details.
lora_stack: Optional stack from FunPack LoRA Loader. The refiner uses it to save next-run model LoRA weight suggestions.
latent: Optional latent input. It is only used when the refined_latent output is also connected. If no saved latent exists yet, the node uses the connected input latent as the current reference.
Outputs
modified_positive: Refined conditioning. Connect this output to the next conditioning stage in your workflow.
status: Short general node state summary. Use this to quickly see whether the refiner is learning well, what it is focused on, and which subsystems are active.
feedback_question: Optional concept feedback prompt generated by the node when feedback mode is active. The node prioritizes category-discovery questions for unknown or auto-classified concept phrases, then uses later 1 to 6 answers to adjust per-concept weights.
training_info: Detailed training diagnostics for the current refinement step, including exact metrics, concept breakdown, LoRA suggestion details, and sigma/latent refinement details.
loss_graph: Graph image showing learning loss over total session iterations for the current refinement key.
refined_sigmas: Refined sigma schedule. If no sigmas input is connected, this output is empty.
refined_latent: Refined latent output. Connecting this output enables latent refinement logic; leaving it disconnected disables latent refinement even if the latent input is connected.
Purpose
Use this node when you want to iteratively tune prompt conditioning based on your own ratings instead of manually rewriting prompts every time. Over multiple runs, it builds a refinement profile for the selected refinement_key.
Latent Refinement
Use FunPack Save Refinement Latent to store a reference latent tensor bundle under a refinement_key and tokenizer mode. When FunPack Video Refiner later receives a latent input with the same key and mode, it loads that saved latent and applies a small rating-driven adjustment to the latent output.
For LTX audio/video workflows, the latent path must use video latents only:
- Split sampler output with
LTXVSeparateAVLatent. - Send the video latent output to
FunPack Save Refinement Latent. - Send the plain video latent to
FunPack Video Refinerlatent input. - Send
FunPack Video Refinerrefined_latenttoLTXVConcatAVLatentvideo_latent. - Send the original audio latent to
LTXVConcatAVLatentaudio_latent.
Do not connect the combined AV latent from LTXVConcatAVLatent, the sampler AV output, or the audio latent to this node. Those use LTX nested/audio latent structures and are intentionally rejected with a clear error.
Some LTX separated video latents keep type: audio metadata even after LTXVSeparateAVLatent; the node accepts those when their samples tensor is the 5D video tensor shape.
Latent refinement follows the connection state exactly:
- If the latent input is disconnected and
refined_latentis disconnected, latent tweaking is disabled. - If the latent input is disconnected,
refined_latentis connected, and no saved latent exists, the node errors with:No available latent to operate. Please connect reference latent to input of Video Refiner. - If the latent input is disconnected,
refined_latentis connected, and a saved latent exists, the node reports:Running refinement on saved latent. Changing reference latent shape and size will cause no effect to generation. - If the latent input is connected and
refined_latentis disconnected, latent tweaking is disabled. - If both latent input and
refined_latentare connected but no saved latent exists, the node passes the input latent through unchanged and saves it as the current reference. - If both are connected and the saved latent shape does not match the current input, the node rewrites the reference and passes the current input through unchanged.
- If both are connected and the saved latent shape matches the current input, the node tweaks the latent using the connected input as the base and the saved latent as the learned reference. The refined tensor is bounded to the current/reference value range to avoid out-of-range latent values.
Resetting the session deletes the saved latent reference too.
Latent refinement is intentionally conservative. It tracks latent shape changes in the session state and leaves zero-valued latent positions unchanged because zero values can be intentional.
Capability Boundary
This node cannot make the underlying model generate concepts it does not already know how to represent. If a required subject, action, style, object, anatomy detail, or relationship is missing from the model's learned capabilities, repeating ratings will not teach it from scratch.
The refiner can only adjust the strength, balance, stability, and emphasis of concepts that are already present in the model's output space. Use model choice, LoRAs, ControlNet/reference tools, better source images, or prompt changes when a concept is absent rather than merely under-weighted.