Commit Graph
18 Commits
Author SHA1 Message Date
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
digital-garbageandClaude Sonnet 4.6 1c392c8b88 Add FunPackConditioningAdjust node with Scene Builder-style popup editor
Inserts between Refiner V2 and the sampler. Takes CONDITIONING + CLIP,
lets the user specify phrase/strength pairs in a floating popup panel.
For each active pair: encode the phrase, compute unit-norm direction from
base conditioning toward phrase conditioning (in pooled space), apply at
user-set strength. Positive = push toward that phrase, negative = away.

Bypasses V2's category classification entirely - adjustments target the
exact phrase the user typed, no mis-categorization possible.

Popup hides the raw JSON widget, shows "Edit Adjustments" button on the
node face with a compact summary of active adjustments. Close saves.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 17:03:51 +03:00
digital-garbageandClaude Sonnet 4.6 f0f121ddf2 Fix FunPackAdvisorLLM: thinking tokens, semantic gate, missing import
- Strip <think>...</think> blocks in decode so Qwen3 chain-of-thought
  doesn't pollute the repaired prompt and cause validation to reject it
- Pass enable_thinking kwarg to apply_chat_template (with TypeError
  fallback for models that don't support it); propagate thinking flag
  through tokenize -> generate so the token budget is expanded by 2048
  when thinking mode is active, giving room for reasoning + response
- Return 1.0 from _v2_text_semantic_similarity when the clip has no
  encode_from_tokens_scheduled - generation-only clips can't compute
  similarity so they shouldn't be penalized with a 0.0 semantic gate
- Add FunPackAdvisorLLM to standalone (non-package) imports in
  __init__.py so tests can run without the full ComfyUI runtime
- Update three stale advisor tests: 5-value _v2_prompt_advisor unpack,
  "Encoded as:" prefix change, 6-return-value unpacking after negative
  conditioning was removed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 14:36:49 +03:00
digital-garbageandClaude Sonnet 4.6 8fa4da3d36 Add FunPackAdvisorLLM node + fix session reset clearing all history
FunPackAdvisorLLM:
- Loads any HuggingFace CausalLM via AutoModelForCausalLM.from_pretrained
- Wraps it in _FunPackAdvisorLLMWrapper which exposes tokenize/generate/decode
  matching the interface _v2_generate_advisor_text already uses
- tokenize() accepts system_prompt kwarg, applies the model's own chat
  template via apply_chat_template, absorbs unsupported kwargs silently
- generate() uses max_new_tokens (not max_length) so prompt length does
  not eat into the generation budget
- Model cached in _FUNPACK_ADVISOR_LLM_CACHE by (path, dtype) - no
  reload on repeated runs
- Returns CLIP type so it plugs directly into advisor_clip input
- Default: huihui-ai/Huihui-Qwen3-8B-abliterated-v2

Session reset fix:
- _v2_empty_state was missing intent_expansion_memory, session_source_mean_count,
  liked_dir, bad_dir - these survived reset via setdefault on next run.
  Added all four to the empty state so reset is complete.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 03:41:26 +03:00
digital-garbageandClaude Sonnet 4.6 5d5b171c7f Add FunPack Distilled Flow Sampler for few-step distilled models
New sampler targeting LTX2.3 distilled LoRA and similar 4-8 step
flow-matching distilled video models. Three improvements over plain Euler:

Adams-Bashforth 2-step multistep (order=2, default):
Extrapolates the denoised direction from two consecutive steps using
variable-step-size AB2 coefficients: (1 + r/2) * d_curr - (r/2) * d_prev
where r = h_current / h_previous. Gives second-order accuracy across the
large sigma jumps typical of distilled schedules at zero extra model-call cost.

Heun predictor-corrector on final steps (final_correction_steps=1, default):
Replaces the last N steps with a Heun pass: Euler predictor to sigma_next,
second model call at sigma_next for the corrector direction, averaged update.
Costs one extra model call per corrected step and significantly improves
sharpness and detail in the steps that define the final output.
Multistep history is invalidated after each Heun step.

Optional s_noise (default 0.0 = deterministic):
Small ancestral-style noise injection (scaled by sigma_up) for diversity.
Distilled models are trained as pure ODE; any non-zero value is an
intentional deviation. Keep below 0.15 if used at all.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 18:42:58 +03:00
digital-garbage a38fea93b7 Add FunPack Scene Builder 2026-05-13 22:10:25 +03:00
digital-garbage 78dc9252f6 Release Refiner V2 appearance safety 2026-05-08 19:28:00 +03:00
digital-garbage faec254cd9 Fix refiner phrase category alignment 2026-05-07 21:22:17 +03:00
digital-garbage cf9afb2539 Prepare 2.2.0 refiner release 2026-05-07 20:28:30 +03:00
digital-garbage f722a06526 Add video refiner v2 2026-05-07 20:04:44 +03:00
digital-garbage b43dd1f67a Move shot enforcement into video refiner 2026-05-06 13:16:07 +03:00
digital-garbage ecaa58f295 Add shot planning and context transition controls 2026-05-06 13:07:45 +03:00
digital-garbage 47a8d81724 Add FunPack template manager 2026-05-02 11:20:49 +03:00
digital-garbage 7438cfb125 Add CLIP Vision output combine node 2026-04-24 01:41:09 +03:00
digital-garbage 9586370ece Add Video Refiner latent refinement dev path 2026-04-23 18:23:07 +03:00
aimfordeb 7315fab459 Simplify FunPack LoRA weight workflow 2026-04-23 14:52:03 +03:00
aimfordeb 0f0d726b1f Release FunPack 2.0.0 2026-04-23 13:57:23 +03:00
Waves 66f504b1e8 Initial upload - v1.1.1 2025-06-10 16:07:29 +03:00