Commit Graph
11 Commits
Author SHA1 Message Date
DigitalGarbage f6d91dfb20 Fix the advisor tab 2026-05-18 18:09:04 +03:00
digital-garbageandClaude Sonnet 4.6 cb4a4a8767 FunPackStudio: auto-save all field changes to widget with 600ms debounce
Event delegation on the panel root catches every input/change event
from any field inside the popup and schedules a debounced save to the
studio_settings and adjustments widgets. Changes survive page refresh
without needing to click Close.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:55:41 +03:00
digital-garbageandClaude Sonnet 4.6 0dfe96064d FunPackStudio: persist active tab across page refreshes via localStorage
Stores the last active tab per node ID. Survives page refresh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:53:26 +03:00
digital-garbageandClaude Sonnet 4.6 53555bd495 FunPackStudio: clear sampler body before re-render on type change
renderSampler() now clears the body before rebuilding so changing the
sampler type replaces the settings instead of appending to them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:50:08 +03:00
digital-garbageandClaude Sonnet 4.6 8390a17baf FunPackStudio: add sampler outputs and Sampler popup tab
Two new output pairs between seed and loss_graph:
- high_pass_sampler (SAMPLER) + high_pass_sigmas (SIGMAS)
- low_pass_sampler (SAMPLER) + low_pass_sigmas (SIGMAS)

Sampler tab in popup: per-pass selection of Hybrid Euler 2S, Distilled
Flow, or KSampler (standard ComfyUI fallback). Each type shows its own
settings fields. Motion pulse and velocity bias sections collapse when
mode is "off". Sigmas entered as comma-separated floats; empty means
rely on external sigmas input.

Python: _build_one_sampler() and _build_samplers() class methods handle
the instantiation and sigma parsing. Each sampler is built from the
same get_sampler() call as the standalone node.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:41:58 +03:00
digital-garbageandClaude Sonnet 4.6 76c8693fe8 FunPackStudio: show Scene Builder banner in Refiner tab when active
When Scene Builder mode is not Pass-through, the Refiner tab shows a
blue banner explaining the positive prompt is built in the Scene tab
with a clickable link that switches to it. The intent override field is
grayed out and disabled since intent derives from the scene prompt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:33:36 +03:00
digital-garbageandClaude Sonnet 4.6 afe703ad56 FunPackStudio: encode negative prompt internally via CLIP
Add negative_prompt STRING input. Priority chain for negative output:
1. negative_conditioning (pre-encoded CONDITIONING) - pass through as-is
2. negative_prompt (text) encoded via CLIP - removes need for external CLIPTextEncode
3. Popup default negative_prompt field in Refiner tab
4. Empty list if nothing is provided

Negative prompt field added to Refiner tab in popup with override toggle.
Override system extended with negative_prompt key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:25:43 +03:00
digital-garbageandClaude Sonnet 4.6 b6edaf6db6 FunPackStudio: integrate full LoRA chain internally, remove lora_stack output
LoRA pipeline is now fully internal to Studio:
1. FunPackApplyLoraWeights reads session weight suggestions for the
   current prompt and builds a stack with adjusted model weights
2. FunPackLoraLoader applies the stack to model and clip
3. refine_v2 receives the LoRA-patched model and applies the attn2
   direction patch on top

Removes the lora_stack return value - MODEL output already contains
everything (LoRA patches + direction injection). External lora_stack
input still accepted to bypass internal management entirely.

Adds mode (ltx2/wan) and per_block settings to the LoRA tab in popup,
stored in loras_config dict in studio_settings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:18:41 +03:00
digital-garbageandClaude Sonnet 4.6 6cf4594397 FunPackStudio: add lora_stack output, unhide positive_prompt
- Add lora_stack (FUNPACK_LORA_STACK) as the 8th return value so the
  active stack flows out for downstream use
- Remove positive_prompt from hidden widgets so the text area is visible
  on the node face and can be connected as a link input

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:09:07 +03:00
digital-garbageandClaude Sonnet 4.6 47d0907030 FunPackStudio: override toggles for external inputs
Each input that has both a connected link and a popup value now has an
"Override" toggle below it (default off). Off = external input wins,
popup value is a fallback. On = popup value wins regardless.

Applies to: refinement_key (Session tab), feedback_prompt and
user_intent_prompt (Refiner tab). All other settings are popup-only
and unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 19:00:45 +03:00
digital-garbageandClaude Sonnet 4.6 cb22c8113f Add FunPackStudio: unified node for all FunPack refinement tools
FunPackStudio combines Refinement Key, Scene Builder, Refiner V2,
Advisor LLM, LoRA loading, and Conditioning Adjust under a single node
with a tabbed popup editor. Rating widget stays on the node face;
everything else is in the popup.

Python:
- FunPackStudio.run() chains all subsystems: scene builder prompt
  construction, advisor LLM load (using shared cache), LoRA loading via
  FunPackLoraLoader, FunPackVideoRefinerV2.refine_v2(), and
  FunPackConditioningAdjust.adjust(). No code duplication.
- Added optional _seed parameter to FunPackVideoRefinerV2.refine_v2()
  so Studio can generate a seed and output it for wiring to samplers.
- Added /funpack/available_loras endpoint for the LoRA picker.

JS (funpack_studio.js):
- Tabbed popup: Session, Scene, Refiner, Advisor, LoRA, Adjustments.
- Session: refinement key, reset toggle, scene builder mode selector.
- Scene: scene load/save, phrase bank from memory, positive prompt
  editor (active when scene builder is not Pass-through).
- Refiner: all V2 settings, feedback prompt, intent override.
- Advisor: LLM enable toggle, model path, dtype.
- LoRA: dynamic list of LoRAs with name/type/model-weight/clip-weight,
  loaded from /funpack/available_loras.
- Adjustments: phrase/strength pairs with session phrase bank.
- Settings serialized as JSON in hidden studio_settings widget.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 18:56:25 +03:00