From 6733ed2fd54de76efaf0b87945b865c73b11ca20 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Thu, 28 May 2026 21:11:34 +0300 Subject: [PATCH] Release 2.7.4 Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ README.md | 12 ++++++++++++ docs/FunPackLTXAVSceneChainSampler.md | 1 + docs/FunPackStudio.md | 8 ++++++++ pyproject.toml | 2 +- 5 files changed, 46 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index baab42f7..e2e7a57f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [2.7.4] - 2026-05-28 + +### Added + +Added **K/V in-context conditioning** for LTXAV identity blocks during i2v generation. Reference hidden states are captured at the start of each scene's denoising pass and prepended as extra attention tokens to the identity-formation blocks ([14, 20, 21, 30, 33]). This forces the model to attend to the reference character's appearance during every self-attention step in those blocks. Result: strong character consistency across scene cuts, view changes, and orientation changes with no LoRAs required. + +Added **Gemma3 vision prompting**. When `source_image` is connected to Studio and the CLIP was loaded with a Gemma3-12B checkpoint via `DualCLIPLoader`, Studio automatically encodes the reference image through the built-in SigLIP vision encoder and feeds the resulting vision tokens into the text conditioning. This means the model conditions on both the prompt text and the actual pixel content of the reference frame. No extra node is required — `DualCLIPLoader` already loads the vision weights when present in the checkpoint. + +Added **per-scene vision re-encoding** to `FunPack LTXAV Scene Chain Sampler`. Connect an optional `clip` input. After each scene is sampled, the next scene's conditioning is re-encoded using the previous scene's decoded last frame as vision context. This gives identical scene texts genuinely different conditioning based on runtime-generated content, so the model knows what state it came from when building the next scene. + +Added **duplicate scene text differentiation**. When two or more scenes share identical text, the second and subsequent occurrences are encoded with a `"Returning to an earlier scene: "` prefix. The original text is preserved in metadata for logging. This breaks the shared conditioning cache entry so the model receives distinct input for each occurrence. + +### Improved + +Reworked `frame_overlap=0` soft continuation: the previous scene's last **4 frames** are now prepended with **mask 0.4** (partial denoising) instead of 1 frame at mask 0.0 (fully pinned). The model receives temporal context from the previous scene while retaining enough denoising freedom to commit to orientation and pose changes directed by the text prompt. + +### Fixed + +Fixed anchor text punctuation when joining scene segments. If the character description ends with `.`, `!`, `?`, or `,`, a plain space is used as the separator instead of injecting a redundant `, `. Previously a description ending with a full stop produced `"description., scene text"`. + +### Removed + +Removed `FunPackGemmaVision` node. It was redundant: `DualCLIPLoader` with a Gemma3-12B checkpoint already loads `vision_model` and `multi_modal_projector` weights through the normal `load_state_dict` path, so the manual weight injection the node performed was a second load of the same file. The vision capability check now detects the attributes directly instead of relying on an injected flag. + ## [2.7.3] - 2026-05-27 ### Fixed diff --git a/README.md b/README.md index 24f71c55..3c7da8d1 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,18 @@ A set of ComfyUI nodes for experimenting with video generation workflows based on WAN, HunyuanVideo, LTX, and similar models. +## Updates in 2.7.4 + +**K/V in-context conditioning** keeps character identity across scene cuts. Reference hidden states captured at the start of each scene are prepended as attention tokens to the model's identity-formation blocks during every denoising step. Strong character consistency across view changes, orientation flips, and hard cuts — no LoRAs required. + +**Gemma3 vision prompting** activates automatically when `source_image` is connected to Studio and the CLIP was loaded from a Gemma3-12B checkpoint. The reference image is encoded through the built-in SigLIP vision encoder and fused with text conditioning. No extra node needed. + +**Per-scene vision re-encoding** in the Scene Chain Sampler. Connect the optional `clip` input and the sampler re-encodes each scene's conditioning using the previous scene's decoded last frame as visual context. Identical scene texts produce genuinely distinct conditioning based on what was actually generated before them. + +**Soft continuation rework**: `frame_overlap=0` now carries 4 partially-denoised frames (mask 0.4) from the previous scene instead of 1 fully-pinned frame. Temporal context without pose lock. + +Also: duplicate scene text now gets a "Returning to an earlier scene" prefix to break shared conditioning; anchor text punctuation is respected when joining scene segments (no stray comma after a full stop); `FunPackGemmaVision` node removed as redundant. + ## Updates in 2.7.2 Shortcuts let you write compact activation words that expand into full cinematic descriptions before the prompt is encoded. Empty replacement removes unwanted phrases (e.g. game character tags). Longer phrases always win over shorter overlapping triggers. Managed in the new Studio Shortcuts tab. diff --git a/docs/FunPackLTXAVSceneChainSampler.md b/docs/FunPackLTXAVSceneChainSampler.md index 7e8c5f97..bc5aff1f 100644 --- a/docs/FunPackLTXAVSceneChainSampler.md +++ b/docs/FunPackLTXAVSceneChainSampler.md @@ -24,6 +24,7 @@ Important: this sampler is resource heavy. Long chains can produce very large fi - `max_scenes`: Maximum scene entries to consume. Default is `8`, but it can be raised for longer chains. - `use_same_seed`: When off, each scene uses `funpack_scene_seed` metadata from Studio/Refiner split mode, falling back to `seed + scene_index`. When on, every scene uses the first provided scene seed or the base `seed`. - `carry_i2v_guides`: Experimental. Appends protected frames from `latent_template`'s `noise_mask` as hidden LTX guide tokens in each continuation chunk. Default is off. **Warning:** using this with `frame_overlap=0` is confirmed to produce bad results — enable only for testing. +- `clip` *(optional)*: Connect the same CLIP as your Studio node. When provided, the sampler re-encodes each scene's conditioning after the previous scene finishes sampling, using the decoded last frame as visual context via Gemma3 vision. This gives identical scene texts genuinely different conditioning and lets the model reason about what state it came from when entering each new scene. Only active when the CLIP has vision capability (Gemma3-12B checkpoint with SigLIP weights). Safe to leave disconnected — behaviour is unchanged without it. ## Behavior diff --git a/docs/FunPackStudio.md b/docs/FunPackStudio.md index 714375cf..dfd09e0b 100644 --- a/docs/FunPackStudio.md +++ b/docs/FunPackStudio.md @@ -121,6 +121,14 @@ Configure two independent sampler outputs: **High Pass** and **Low Pass**. Each Sampler type changes refresh the settings section immediately. All settings auto-save as you type. +### Vision + +When `source_image` is connected and the `clip` input was loaded from a Gemma3-12B checkpoint via `DualCLIPLoader`, Studio automatically encodes the reference image through the built-in SigLIP vision encoder. The resulting vision tokens are fused with the text conditioning so the model conditions on both the prompt and the actual pixel content of the reference frame. + +No extra node or configuration is required. The capability is detected at runtime by checking whether the CLIP's Gemma3 transformer has `vision_model` and `multi_modal_projector` attributes. The console logs `[FunPackStudio] Processing input image with Gemma3 vision...` when active and reports the token count on completion. + +Vision encoding encodes the full frame including background. For character consistency across varied environments keep the reference image background neutral or ensure the scene prompts are explicit enough to override the environmental bias from the vision tokens. + ### Adjustments Manually adjust the encoded conditioning by blending specific phrase directions. Bypasses V2's category classification - the direction is computed directly from the phrase you type, not inferred from which axis it belongs to. diff --git a/pyproject.toml b/pyproject.toml index d7f5464f..50af70fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ [project] name = "ComfyUI-FunPack" # Unique identifier for your node. Immutable after creation. description = "A set of nodes for experiments with video generation models, including prompt refinement, adaptive LoRA weight workflows, story tools, video stitching, lorebook enhancement and more." -version = "2.7.3" # Custom Node version. Must be semantically versioned. +version = "2.7.4" # Custom Node version. Must be semantically versioned. license = { text = "GNU GPL v3" } dependencies = [] # Filled in from requirements.txt