Files
olivv-cs-ComfyUI-FunPack/docs/FunPackGemmaEmbeddingRefiner.md
T

5.2 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: Rating for the previously generated result, from 1 to 10, where 1 means "awful" and 10 means "masterpiece".

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.

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 feedback question on its own 1 to 6 scale. This is only useful when concept feedback is enabled.

lora_stack: Optional stack from FunPack LoRA Loader. The refiner uses it to save next-run model LoRA weight suggestions.

latent: Optional latent input. If a latent was saved with FunPack Save Refinement Latent under the same refinement_key and mode, the node can return a conservatively refined latent. If no saved latent exists, or if no latent is connected, latent refinement is skipped.

Outputs

modified_positive: Refined conditioning. Connect this output to the next conditioning stage in your workflow.

status: Human-readable training status, including iteration and refinement diagnostics.

feedback_question: Optional concept feedback prompt generated by the node when feedback mode is active.

training_info: Additional training details for the current refinement step.

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. If latent refinement is inactive, this passes the input latent through unchanged or returns an empty latent when no 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.

If the refiner receives a latent input but no saved latent exists yet, it passes the input latent through unchanged and saves it as the current reference. If the input latent shape changes later, it rewrites the saved reference and passes the new latent through unchanged for that run. 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. If the latent input is not connected, the refiner skips latent refinement and continues with conditioning/sigma/LoRA behavior as usual.

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.

Warning

Sigma refinement currently breaks audio generation in workflows that also produce audio streams. If you need audio to generate and save correctly, do not connect sigmas to this node. Use the refiner only for conditioning in those workflows.