Add vision conditioning toggle to Studio popup
Reads settings.refiner.vision_conditioning (default true) and gates source_image passed as reference_image to Gemma3 encoding. Toggle lives in the popup UI next to Reference injection, not on the node. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
027e8baae5
commit
f71c2c4a67
+2
-1
@@ -12937,6 +12937,7 @@ class FunPackStudio:
|
||||
if split_transition_placement not in ("start", "end", "silent"):
|
||||
split_transition_placement = "start"
|
||||
reference_injection = bool(rf.get("reference_injection", False))
|
||||
vision_conditioning = bool(rf.get("vision_conditioning", True))
|
||||
|
||||
# feedback_prompt: popup wins if override is on, else external wins
|
||||
popup_feedback = str(rf.get("feedback_prompt", "") or "")
|
||||
@@ -13052,7 +13053,7 @@ class FunPackStudio:
|
||||
refinement_key_input=refinement_key_input,
|
||||
positive_conditioning=positive_conditioning,
|
||||
clip_vision_output=clip_vision_output,
|
||||
source_image=source_image,
|
||||
source_image=source_image if vision_conditioning else None,
|
||||
model=model,
|
||||
mode=mode,
|
||||
advisor_mode=advisor_mode,
|
||||
|
||||
@@ -69,7 +69,7 @@ function defaultSettings() {
|
||||
refinement_key: "",
|
||||
overrides: { refinement_key: false, feedback_prompt: false, user_intent_prompt: false, negative_prompt: false },
|
||||
scene_builder: { mode: "Pass-through", scene: NONE_SENTINEL, scene_name: "", aliases: "", scene_positive: "", scene_negative: "" },
|
||||
refiner: { mode: "Refine", advisor_mode: "Off", advisor_thinking: true, prompt_repair: true, im_feeling_lucky: false, reset_session: false, feedback_prompt: "", user_intent_prompt_override: "", negative_prompt: "", temporal_style: "natural", split_by_transitions: false, split_transition_placement: "start", reference_injection: false },
|
||||
refiner: { mode: "Refine", advisor_mode: "Off", advisor_thinking: true, prompt_repair: true, im_feeling_lucky: false, reset_session: false, feedback_prompt: "", user_intent_prompt_override: "", negative_prompt: "", temporal_style: "natural", split_by_transitions: false, split_transition_placement: "start", reference_injection: false, vision_conditioning: true },
|
||||
advisor_llm: { enabled: false, model_path: "huihui-ai/Huihui-Qwen3-8B-abliterated-v2", dtype: "bfloat16" },
|
||||
loras: [],
|
||||
loras_config: { mode: "ltx2", per_block: false },
|
||||
@@ -927,6 +927,12 @@ function openPanel(node) {
|
||||
"Only meaningful when carry_i2v_guides is also enabled in the Scene Chain Sampler - without it the injection has no reliable reference to anchor from."));
|
||||
body.append(row("Reference injection", refInjToggle.wrap));
|
||||
|
||||
if (settings.refiner.vision_conditioning === undefined) settings.refiner.vision_conditioning = true;
|
||||
const visCondToggle = toggleEl(!!settings.refiner.vision_conditioning, "Vision conditioning");
|
||||
visCondToggle.inp.addEventListener("change", () => { settings.refiner.vision_conditioning = visCondToggle.inp.checked; });
|
||||
body.append(el("div", "funpack-studio-hint", "Use the reference image as visual context when encoding the prompt with Gemma3. Disable to test without vision conditioning."));
|
||||
body.append(row("Vision conditioning", visCondToggle.wrap));
|
||||
|
||||
body.append(sectionTitle("Negative prompt"));
|
||||
body.append(el("div", "funpack-studio-hint",
|
||||
"Encoded via CLIP and output as negative conditioning. Skipped when negative_conditioning input is connected."));
|
||||
|
||||
Reference in New Issue
Block a user