Commit Graph
33 Commits
Author SHA1 Message Date
digital-garbageandClaude Opus 4.8 2934afec7e Store refinement keys as readable <key>.json (no hashing); overwrite-or-cancel on import
The key name is now the filename: a key "123" is refinements/123.json, listed by
stem and resolved directly by name everywhere (Studio, loader, Editor, sampler).
This fixes shortcuts spawning ghost keys — a dropped/loaded <key>.json is found
by the refiner's own path lookup with no scanning or adoption needed. Sidecars
keep a <key>.<mode> suffix (value function, sampler context, latents); only keys
that aren't a valid filename fall back to the old <prefix>_<md5> hash.

Clean break: legacy hashed files are not migrated (and are hidden from the key
list rather than shown as hash names). Exports now download as <key>.json so a
re-dropped export is already canonical — no tolerant filename/inner-field
reconciliation layer needed.

Import now prompts overwrite-or-cancel on a name collision (409 -> confirm ->
retry with overwrite), in both the Editor and the Refinement Key Loader node.
413 chunked upload (Vast.ai / Runpod proxy body caps) retained.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 18:05:53 +03:00
digital-garbageandClaude Opus 4.8 c331fc21c7 Make refinement keys cross-compatible: detect any-named drops, chunk uploads past proxy limits
Detection: refinement_key_names() now scans every .json in the refinements
folder (not just the canonical refine_v2_<hash>.json name) and tolerates the
{"state": ...} export wrapper, so manually-placed keys and HuggingFace downloads
are listed whatever they're named. On detection/load they self-heal: the file is
migrated to the canonical hashed path so loads (which resolve by hash) succeed
everywhere — fixing keys that listed but wouldn't load. Sidecars (sampler_ctx
etc.) are excluded by the clip-namespace check.

Upload 413: large keys POSTed in one shot were rejected by the reverse proxies
on Vast.ai / Runpod (body cap well under ComfyUI's 100 MB). importRefinementKey
now streams big keys in 256 KB byte-accurate chunks reassembled server-side via
new /refinement_keys/import_chunk + /import_finalize routes; small keys keep the
fast single POST with an automatic chunked fallback on 413.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 15:41:59 +03:00
digital-garbageandClaude Opus 4.8 5f784285d0 Stop splitting shortcut replacements on commas
A replacement is a prose phrase and may contain commas (e.g. "The video
rapidly cuts, showing the next view."). Both the Movie Editor's splitLines
and the backend _shortcut_replacements string fallback split on commas, so
one phrase became several variants: the editor showed it across lines,
expansion picked one half at random (never matching the comma-form transition
trigger), and a comma edit reverted on save because it re-split every time.

Replacements are now one-per-line only (commas preserved); triggers still
accept comma-separation per their UI. Existing torn replacements self-heal on
the next edit + save.

- mediabrowser.js: separate splitTriggers (\n or ,) and splitReplacements (\n).
- templates.py: _shortcut_replacements string fallback splits on \n only.
- tests: comma phrase stays one replacement (list + string + normalize paths).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 10:56:16 +03:00
digital-garbageandClaude Opus 4.8 1a475f73d4 Add multi-refinement-key support to the Movie Editor
- Shortcuts carry an optional refinement_key (templates model + expansion);
  editor gains a "Use non-default refinement key" checkbox + field.
- Project-level Refinement key field (Studio engine card) wired through
  server -> builder into FunPackRefinementKeyLoader (settable in any mode).
- Per-scene key attribution (prompt_scene_shortcut_keys): keys whose shortcuts
  fired in a scene; anchor keys count for every scene; union fallback on
  rewrite/count mismatch.
- Per-scene conditioning merge: steer with each participating key's state and
  average (one key = substitute, none = default), replacing the default-key
  relative steering for keyed scenes.
- Multi-key rating: full per-scene learning suite + value fn trained into each
  participating key's state.
- Tests for shortcut key surfacing, expansion tagging, per-scene attribution,
  fallback, and keyloader injection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 00:01:35 +03:00
digital-garbage df4e7b4a9c Movie Editor: per-scene Refiner ratings, clip export trim, NLE polish.
Editor chain runs pass multiple scene ratings to Refiner for per-scene learning;
export trims chain output to the selected scene. Also includes parse bridge fixes,
timeline NLE gaps, and seam UI cleanup.
2026-06-11 14:14:43 +03:00
digital-garbageandCursor 947e3637c3 Separate prompt split markers from timeline NLE effects and transitions.
Split markers are prompt-only in Studio and the Cutting Room; video blends and clip effects live in the NLE library and + Add menu. Rename on-disk/export defaults to promptsplit.json and funpack_promptsplit.json.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-11 12:55:07 +03:00
digital-garbageandClaude Sonnet 4.6 f1b54da9dd Add value function export/import to Studio
Two server routes (GET /funpack/value_function/export, POST /funpack/value_function/import)
serve and receive the .pt binary. Studio Session tab gains Export and Import buttons
below the value guidance toggle, keyed to the active refinement key.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 11:04:10 +03:00
digital-garbageandClaude Sonnet 4.6 6f540791fe Rewrite timeline parsing to use the actual Studio splitter
Extract _v2_split_prompt_by_transitions to module-level
split_prompt_by_transitions. parse_timeline_segments now calls it
directly with placement=silent — same code path as generation.
Eliminates all reimplemented splitting logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 02:44:00 +03:00
digital-garbageandClaude Sonnet 4.6 0bfaff0d1b Fix Timeline: expand shortcuts before splitting into scenes
The pipeline is shortcuts → transitions → split. The route now runs
apply_prompt_shortcuts first, then parse_timeline_segments on the
expanded text, matching actual generation behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 02:25:58 +03:00
digital-garbageandClaude Sonnet 4.6 e680cc8d6a Fix Timeline tab: follow link to read connected positive_prompt node
widgetByName returns nothing when the input is connected. Traverse the
graph link to the source node and read its first widget value instead.
Also fix custom_map always being empty when refinement_key is set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 02:20:49 +03:00
digital-garbageandClaude Sonnet 4.6 efba52d951 Add Timeline preview tab to Studio
Read-only horizontal timeline showing detected scenes as boxes with
transition connectors between them. Backed by a new
POST /funpack/parse_timeline route and parse_timeline_segments() in
conditioning.py that reuses the existing transition phrase patterns
and custom transition map.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 02:11:07 +03:00
digital-garbageandClaude Sonnet 4.6 9dbd239702 Add visual transition effects to scene chain sampler
Custom transition triggers in Studio can now have a visual_effect assigned
(fade_to_black, crossfade, blur_out_in). When triggered during scene splitting,
the effect fires at that scene boundary: the sampler decodes the latent window
around the boundary, applies the pixel-space effect, and re-encodes in-place.

No new nodes needed — VAE is already connected to the scene chain sampler.
New transition_duration input controls how many pixel frames are affected.
New scene_boundaries output provides the boundary list for debugging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 17:50:31 +03:00
digital-garbageandClaude Sonnet 4.6 223e60e832 Add silent transition placement - split without outputting the trigger
New placement option 'silent': the transition phrase marks the scene
boundary but is stripped from the output entirely. Neither the previous
nor the next segment contains it. Available globally and as a per-entry
override on custom transitions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 19:38:29 +03:00
digital-garbageandClaude Sonnet 4.6 5e1aa4a6c3 Add transition placement control (start/end of segment)
- Global setting in Studio Refiner tab: "Transition placement" (start/end).
  start = transition opens the new segment (existing default behavior).
  end = transition closes the previous segment instead.
- Per-entry placement override in Transitions tab (global/start/end).
  Custom transitions can pin their placement regardless of the global setting.
- transition items gain a placement field (global/start/end, defaults to global).
- load_custom_transition_triggers returns {trigger_lower: placement|None} so
  the split function can do per-trigger lookups efficiently.
- refine_v2 and Studio.run() wired with split_transition_placement parameter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 19:10:13 +03:00
digital-garbageandClaude Sonnet 4.6 acdc4c41d6 Collapsible shortcut/transition rows, optional replacement, name fallback
- Shortcuts and Transitions: saved entries collapse to a summary row (name +
  on/off badge); click to expand, Collapse button to close without saving
- Transition summary also shows trigger phrase in italic next to the name
- Shortcuts: replacement is no longer required; blank/missing defaults to [""]
  which removes the matched phrase (same as explicit empty replacement)
- Shortcuts: name falls back to first activation word when left blank
- New summary row CSS: badge-on/badge-off, label, trigger styles

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 18:16:59 +03:00
digital-garbageandClaude Sonnet 4.6 889e4dc2c8 Add shortcuts empty replacement, custom transitions, and longer-phrase-wins tests
- Shortcuts: allow empty string as a valid replacement to remove matched phrases
  from prompts; post-pass cleans up orphaned commas/spaces left by removals
- Shortcuts: add cross-shortcut longer-phrase-wins test confirming ordered
  alternation handles multiple shortcuts with overlapping triggers correctly
- Transitions: new user-editable transition word list stored in transitions.json;
  custom triggers extend the built-in split pattern at runtime, keyed by name
- Transitions: Studio JS gets a dedicated Transitions tab (name, trigger, enabled)
  with Add/Refresh/Import/Export toolbar
- Transitions: four API routes mirroring shortcuts (GET, export, save/delete, import)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 17:47:55 +03:00
digital-garbage 3434d1efa2 Add global scene shortcuts 2026-05-22 16:38:33 +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
digital-garbageandClaude Sonnet 4.6 9c06051a74 FunPackConditioningAdjust: add refinement key phrase bank
When refinement_key_input is connected (from FunPack Refinement Key
Loader), the popup fetches phrase_memory from that session via a new
/funpack/phrase_memory endpoint and shows all learned phrases as
clickable chips grouped by category. Click a chip to add it to the
adjustment list with a default strength of 0.1.

Search field filters phrases live. Phrases are sorted by evidence count
so the most-seen ones appear first within each category.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 17:07:21 +03:00
digital-garbage 644cd7629a Fix scene builder mode and add refiner learning mode 2026-05-15 13:07:41 +03:00
digital-garbage 9212fa1e27 Preserve saved scene prompt order 2026-05-14 15:55:38 +03:00
digital-garbage 005520e2aa Add scene preconstruct editor tools 2026-05-14 15:23:47 +03:00
digital-garbage 0cad05c55c Link refiner with scene builder memory 2026-05-14 14:59:50 +03:00
digital-garbage 83b0ae326a Hide scene builder internals 2026-05-14 12:42:23 +03:00
digital-garbage b4098aee2a Simplify scene builder wildcards 2026-05-14 12:28:17 +03:00
digital-garbage 2d1e4313d3 Rework scene builder editor 2026-05-14 09:55:18 +03:00
digital-garbage 789f56a461 Refine Scene Builder editor 2026-05-13 23:00:40 +03:00
digital-garbage 71aad9e3d4 Add Scene Builder learning mode 2026-05-13 22:34:33 +03:00
digital-garbage 325bb3721c Simplify Scene Builder surface 2026-05-13 22:27:51 +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 cf9afb2539 Prepare 2.2.0 refiner release 2026-05-07 20:28:30 +03:00
digital-garbage 47a8d81724 Add FunPack template manager 2026-05-02 11:20:49 +03:00