diff --git a/conditioning.py b/conditioning.py index 826e3072..4f970362 100644 --- a/conditioning.py +++ b/conditioning.py @@ -6722,7 +6722,8 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner): except Exception: return None - def _v2_encode_prompt(self, clip, prompt_text, encode_cache=None, reference_image=None): + def _v2_encode_prompt(self, clip, prompt_text, encode_cache=None, reference_image=None, + h3_references=None): if clip is None: return None, {"pooled_output": None}, "CLIP missing" prompt_text = str(prompt_text or "").strip() @@ -6734,10 +6735,24 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner): # ": " before the prompt) — so the Gemma3 vision probe below # returns False for it and the image would be silently dropped. Detect it first. try: - from .minimax_h3 import is_h3_clip + from . import minimax_h3 as h3mod except ImportError: - from minimax_h3 import is_h3_clip - h3 = is_h3_clip(clip) + import minimax_h3 as h3mod + h3 = h3mod.is_h3_clip(clip) + + # ref2va: references have to reach the model twice — as presentation here (Qwen sees + # ": " so the prompt can name it) and as latent blocks later, + # in the SAME order. Studio owns the CLIP but not a VAE, so it resolves the ordered + # spec, bakes the presentation, and hands the resolved order to the Chain Sampler, + # which owns the VAE and encodes exactly that list. Only images carry pixels into + # Qwen; audio contributes a bare "