Document nodes and bump version to 1.3.3

This commit is contained in:
dex
2026-04-22 03:46:43 +03:00
parent 57fcb772b6
commit 92c68a02b6
11 changed files with 208 additions and 36 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## [1.3.3] - 2026-04-22
### Changed
Expanded `/docs` so every node in `funpack.py` now has matching documentation, and refreshed the existing node docs to match the current inputs and outputs.
## [1.3.2] - 2026-04-19
### Changed
+17
View File
@@ -0,0 +1,17 @@
# FunPack Continue Video
This node extracts the last part of a frame batch so it can be reused as continuation input for another generation step.
## Parameters
**images**: Input image batch or video frame sequence.
**frame_count**: Number of trailing frames to extract from the end of the batch.
## Outputs
**CONTINUED**: The last `frame_count` frames from the input sequence.
## Purpose
Use this node when your next workflow step needs the ending frames of a clip to continue motion or preserve temporal context.
+28 -12
View File
@@ -1,25 +1,41 @@
# FunPack Gemma Embedding Refiner
## Parameters:
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.
**rating** - Rating for previously generated video, from 1 to 10, where 1 means "awful, totally not what I asked for" and 10 means "masterpiece, exactly what I have asked for".
## Parameters
Rating is NOT balanced. 5 is not the true middle, 5.5 is.
**positive_conditioning**: Conditioning to refine. Place this node after your text encoder and before the downstream video conditioning node.
**refinement_key** - Name for the .json file that contains the tuned deltas for conditioning. You can re-use previously trained .json files - they are stored in /custom_nodes/ComfyUI-FunPack/refinements.
**mode**: Tokenizer mode used for prompt analysis. Use `ltx2` for LTX-style workflows and `wan` for Wan workflows.
**positive_prompt** - Connect your prompt into this input to provide tokens for tokenization and better refinement based on used tokens.
**rating**: Rating for the previously generated result, from 1 to 10, where 1 means "awful" and 10 means "masterpiece".
**reset_session** - If set to true, resets the training progress and re-creates the .json file.
**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.
**unlimited_history** - If set to true, limitation of maximum embeddings that can be stored is removed (default: 200).
**scheduler_mode**: Learning behavior preset. `original` keeps the legacy behavior, while `accurate` and `aggressive` adjust how strongly the node updates the refinement.
## Outputs:
**positive_prompt**: Optional prompt text used for token analysis and concept-level feedback.
**modified_conditioning** - tweaked deltas. Put it after CLIP Text Encode, but before LTXVConditioning nodes. Correct link: DualCLIPLoader -> CLIP Text Encode -> FunPack Gemma Embedding Refiner -> LTXVConditioning -> KSampler (or CFGGuider, or whatever sampler you are using).
**reset_session**: If enabled, clears the saved training history for the selected refinement key and starts a fresh session.
**status** - Shows the current status of refinement: iteration ID, rating for previous generation, prompt similarity threshold, last reward change, EMA, ratio of good deltas, exploration strength, exploration status and top 10 tokens the current embedding emphasizes on.
**unlimited_history**: If enabled, disables history pruning.
## Purpose:
**seed**: Seed used for exploration behavior during refinement.
This node's purpose is to analyze the text embeddings and change them according to the given rating. Basically, this node tries to find the best values for deltas that you will more likely rate higher, and suppresses ones you rated lower, leading to consistently better output.
**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.
## 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.
## 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`.
+13 -7
View File
@@ -1,19 +1,25 @@
# FunPack Lorebook Enhancer
This node helps you with loading SillyTavern format lorebooks to use with Prompt Enhancer and Story Writer nodes, enhancing the prompt with related tags from lorebooks.
This node loads SillyTavern-style lorebook JSON files and appends matching lore entries to the end of your prompt.
## Parameters
**prompt**: Your prompt that has to be enhanced with lorebooks tags.
**prompt**: Base prompt that should be enhanced with lorebook content.
**lorebook**: Full path to your .json lorebook file.
**lorebook_1, lorebook_2, lorebook_3, lorebook_4**: Full paths to lorebook `.json` files. You can use one lorebook or combine up to four.
**context_history**: If enabled, remembers the previous context to use for the next generation.
**entry_delimiter**: Extra delimiter text intended for separating injected entries. At the moment, the node always appends entries line by line, so this input currently has no visible effect.
**scan_depth**: How many previous messages to include into context. Min 1 (only last message), max 12.
**context_history**: Additional context text that is scanned together with the current prompt when looking for matching lorebook entries.
**scan_depth**: How many trailing lines from `context_history + prompt` should be scanned for lorebook triggers.
## Outputs
**enhanced_prompt**: Your revamped prompt with injected knowledge from lorebooks.
**enhanced_prompt**: Your original prompt with the activated lorebook entries appended to the end.
**injected_content**: What's exactly injected into your prompt.
**injected_content**: A readable list of the exact lorebook entries that were injected.
## Purpose
Use this node to bring character, world, or setting information from SillyTavern lorebooks into Prompt Enhancer or Story Writer workflows without manually copying lore into every prompt.
+17
View File
@@ -0,0 +1,17 @@
# FunPack Prompt Combiner
This node merges one shared base prompt with up to 5 per-shot prompt additions.
## Parameters
**main_prompt**: Base prompt that should appear in every output.
**prompt1, prompt2, prompt3, prompt4, prompt5**: Optional prompt additions for each output slot.
## Outputs
**out1, out2, out3, out4, out5**: Combined prompts. Each output contains `main_prompt` plus its matching optional prompt input. If an optional prompt is empty, the output falls back to just the main prompt.
## Purpose
Use this node when you want to keep shared quality or style text in one place while still producing separate prompts for multiple shots or branches.
+25
View File
@@ -0,0 +1,25 @@
# FunPack Prompt Enhancer
This node uses an LLM to rewrite a simple user prompt into a richer video description.
## Parameters
**user_prompt**: Short prompt or concept you want to expand.
**system_prompt**: Instruction telling the LLM how to structure the enhanced prompt.
**model_path_type**: Choose between a local `.safetensors` LLM file and a HuggingFace pretrained model.
**model_path**: HuggingFace repository path used when loading a pretrained model.
**llm_safetensors_file**: Local `.safetensors` model file from your ComfyUI `models/clip` folder.
**top_p, top_k, temperature, max_new_tokens, repetition_penalty**: Text generation settings that control variety and output length.
## Outputs
**enhanced_prompt**: The rewritten prompt generated by the LLM.
## Purpose
Use this node when you want a rough idea turned into a more detailed video prompt before passing it into the rest of your workflow.
+33
View File
@@ -0,0 +1,33 @@
# FunPack StoryMem Keyframe Extractor
This node extracts representative keyframes from a video batch using CLIP Vision similarity, with optional HPSv3 quality filtering.
## Parameters
**frames**: Input frame batch in ComfyUI `IMAGE` format.
**clip_vision**: CLIP Vision model from your ComfyUI `models/clip_vision` folder.
**max_keyframes**: Maximum number of keyframes to return.
**similarity_threshold**: Similarity cutoff used when deciding whether a frame is different enough from the previous keyframe. Lower values usually keep more frames.
**use_quality_filter**: If enabled, the node also filters frames using HPSv3 quality scoring.
**quality_threshold**: Minimum HPSv3 score accepted when quality filtering is enabled.
**memory_frames**: Optional earlier keyframes to compare against so near-duplicates can be skipped.
## Outputs
**keyframes**: Extracted keyframes as an image batch.
**keyframe_count**: Number of frames returned in the `keyframes` output.
## Purpose
Use this node to distill a longer clip into a few representative frames for StoryMem, continuity, or recap workflows.
## Notes
HPSv3 is optional and is only used when `use_quality_filter` is enabled and the package is installed.
+19
View File
@@ -0,0 +1,19 @@
# FunPack StoryMem Last Frame Extractor
This node extracts the final frame and the final N frames from a video batch for continuity workflows.
## Parameters
**frames**: Input frame batch in ComfyUI `IMAGE` format.
**n_frames**: Number of trailing frames to include in the motion output.
## Outputs
**last_frame**: Final frame from the input batch, returned as a single-frame image batch.
**motion_frames**: Last `n_frames` frames from the input batch.
## Purpose
Use this node when the next shot needs the exact last frame for image-to-video continuity, plus a short tail of recent motion frames for motion-aware continuation workflows.
+28 -16
View File
@@ -1,33 +1,45 @@
# FunPack Story Writer
This node is designed for generating up to 5 prompts for 5 video sequences, based on user's prompt and previous context.
This node generates up to 5 sequential prompts for video shots based on a user request, optional per-shot instructions, and an LLM.
It's finetuned to be used with LLaMA-3 LLM family (3, 3.1, 3.1-instruct), technically it can support LLaMA-based merges but good results are not guaranteed.
**Attention: GGUF models, as well as other newer quantized models variants are not supported.**
It is built around LLaMA-style chat models and is intended for story-driven multi-shot generation workflows.
## Parameters
**user_prompt**: Your original prompt for generating the story.
**user_prompt**: Main instruction describing the overall story, scene, or video idea.
**story_system_prompt**: Instruction for LLM on how to process your prompt and convert it into a story.
**prompt1, prompt2, prompt3, prompt4, prompt5**: Optional extra instructions for specific sequence slots. Leave them empty if you want the node to decide each shot from the main request alone.
**sequence_system_prompt**: Instruction for LLM on how to generate the prompt for the next sequence.
**story_system_prompt**: System instruction used when the node first generates a hidden story outline.
**model_path_type**: Choose between local .safetensors file path or download a Diffusers-format model from Huggingface.
**sequence_system_prompt**: System instruction used when generating the actual sequence prompts.
**model_path**: Path to Huggingface repository.
**model_path_type**: Choose between a local `.safetensors` LLM file and a HuggingFace pretrained model.
**llm_safetensors_file**: Selector for local .safetensors file (should be downloaded into ComfyUI/models/clip).
**model_path**: HuggingFace repository path used when `model_path_type` is set to pretrained.
**prompt_count**: How many prompts to generate (min 1, max 5).
**llm_safetensors_file**: Local `.safetensors` model file from your ComfyUI `models/clip` folder.
**top_p, top_k, temperature, max_new_tokens, repetition_penalty**: Parameters responsible for more creative or more strict text generation.
**prompt_count**: Number of sequence prompts to generate, from 1 to 5.
**mode**: Generate sequences based on the story and previous sequences or generate based on user's prompt and previous sequences (story generation is skipped).
**top_p, top_k, min_p, temperature, max_new_tokens, repetition_penalty**: Text generation settings that affect variety, strictness, and output length.
**recommend_loras**: Experimental feature. After generating all sequences, analyzes the list of LoRAs you have and suggests which to use in each sequence. Output is in console.
**mode**: `Sequences from story` first creates a hidden story and then expands it into shots. `Sequences from user prompt` skips the hidden story step and generates shots directly from the user request.
**sanity_check**: Perform an additional check after generating a prompt to make sure resulting prompt is matching requirements.
**vision_input**: Optional text from a vision-language model describing the starting image so the generated shots can stay aligned with it.
**sanity_check_system_prompt**: Instruction for LLM on how to perform sanity check.
**sanity_check**: If enabled, each generated sequence is reviewed by the same model and corrected if it breaks the requested rules.
**sanity_check_system_prompt**: System instruction used for the sanity-check pass.
**disable_continuity**: If enabled, later sequences are generated without feeding the previously generated shot history back into the model.
**provide_current_id**: When continuity is disabled, this controls whether the current sequence number is still provided to the model.
## Outputs
**prompt1, prompt2, prompt3, prompt4, prompt5**: Generated sequence prompts. Outputs beyond `prompt_count` are returned as empty strings.
## Purpose
Use this node when you want one LLM pass to turn a high-level idea into a short sequence of video prompts that still feel connected from shot to shot.
+21
View File
@@ -0,0 +1,21 @@
# FunPack Video Stitch
This node blends multiple image-frame batches into one longer sequence by crossfading between neighboring videos.
## Parameters
**blend_frames**: Number of frames used for each transition between neighboring videos.
**video1, video2, video3, video4, video5, video6, video7, video8**: Input frame batches to stitch together. At least 2 connected inputs are required.
## Outputs
**STITCHED**: Single image batch containing the stitched sequence with blended transitions.
## Purpose
Use this node when you have multiple generated clips and want to merge them into one smoother sequence instead of cutting abruptly between them.
## Notes
Each connected input batch must contain at least as many frames as `blend_frames`.
+1 -1
View File
@@ -2,7 +2,7 @@
[project]
name = "funpack" # Unique identifier for your node. Immutable after creation.
description = "A set of nodes for experiments with video generation models, including Prompt Enhancer, Story Writer, Video Stitch, Creative Template, Lorebook Enhancer and many other nodes."
version = "1.3.2" # Custom Node version. Must be semantically versioned.
version = "1.3.3" # Custom Node version. Must be semantically versioned.
license = { text = "GNU GPL v3" }
dependencies = [] # Filled in from requirements.txt