Commit Graph

14341 Commits

Author SHA1 Message Date
CalamitousFelicitousness 2c66039c37 feat(video): derive input mode from the registry row
Two ladders decided how a model's inputs get wired, and they had drifted: the
api reported an unrecognized row as t2v while run() fell through to a branch
that wires nothing. Eight LTX condition rows sat in that gap, advertised as
text to video and generating without their conditioning.

dispatch_mode answers once from the row, reading name markers before the
pipeline class because one class serves several modes: six LTXConditionPipeline
rows are named T2V or I2V and generate as such. Rows that declare nothing now
resolve as condition, and the api reports that instead of guessing t2v.
2026-08-18 00:44:28 +01:00
CalamitousFelicitousness 680005c61d fix(framepack): default the vae dropdown to a value it offers
The FP VAE dropdown defaulted to Local, which is not among its choices, so
the control rendered with an out-of-list value. The decode dispatch treats
anything unrecognized as Full, so Full is the value the default already
meant.
2026-08-18 00:32:50 +01:00
CalamitousFelicitousness 41be54eb01 fix(video): correct the cosmos row duplication and its model url
The nVidia Cosmos engine carried two byte-identical Predict2 2B I2V rows,
so the dropdown showed the name twice. The surviving row's url now points
at the Video2World repo it loads; it pointed at the Text2Image image model.
2026-08-18 00:32:44 +01:00
Vladimir Mandic e23a70af34 fix processing api
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-17 18:07:06 +02:00
Vladimir Mandic aa8cd9980e lint
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-17 14:35:52 +02:00
Vladimir Mandic 1bc3420dfb update todo/changelog/submodules
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-17 10:42:51 +02:00
Vladimir Mandic f75e38c4ef krea2 optional dense masking
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-17 10:18:32 +02:00
Vladimir Mandic 9f650367cb multiple cleanups
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-17 09:35:07 +02:00
Vladimir Mandic 392c969754 add offload state_dict
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-17 08:52:46 +02:00
Vladimir Mandic 94eac2a517 Merge pull request #5032 from vladmandic/fix/triton-autotune-diagnostics
feat(triton): report autotune spread and register spills
2026-08-17 08:13:10 +02:00
Vladimir Mandic 993fa4a2c6 Merge pull request #5031 from vladmandic/fix/video-codec-options
fix(video): correct codec option strings to the key=value form
2026-08-17 08:11:52 +02:00
Vladimir Mandic 7bced6d868 Merge pull request #5034 from vladmandic/feat/video-mixed-references
Feat/video mixed references
2026-08-17 08:09:54 +02:00
Vladimir Mandic c053fb6c95 Merge pull request #5033 from vladmandic/fix/video-frame-count
fix(video): count generated frames on the first output axis
2026-08-17 08:05:23 +02:00
CalamitousFelicitousness c4a29bfb94 test(video): note what the reference server probe matches on 2026-08-17 04:12:33 +01:00
CalamitousFelicitousness 885fc34e6b refactor(minimax): delegate tab reference marshalling to the core
The tab held the only code that built video and audio references, sniffed the
file type itself, and dropped anything it did not recognize: an unknown
extension, a file that had gone missing, and any decode failure were all skipped
without a word, leaving a request that generated from fewer references than were
uploaded.

Reference marshalling now goes through the same funnel the api path uses, and
runs before the load, so a rejected file costs nothing and says which file and
why. The workflow comes from the registry row, which is where the loader reads
it from as well.

- a rejected input returns its reason to the output box, since the general
  handler only reaches the log
- references uploaded against a keyframe workflow warn instead of vanishing:
  the accordion hides on a row change but the files it held do not
- guard p.close() in the finally, which the model-not-loaded return has always
  reached before p exists
2026-08-17 04:12:33 +01:00
CalamitousFelicitousness aa86c762bb feat(triton): report autotune spread and register spills
A sweep only logged how long it took, so a config list holding candidates the
hardware runs badly stayed invisible until someone profiled a run that looked
hung. The completion listener already receives every candidate's timing, so the
spread between worst and best is free to report.

- log the winning config, the spread, and any candidates that could not run
- warn once per config when the selected one spills registers, naming it, since
  the sweep line that carries it is debug
2026-08-17 03:47:35 +01:00
CalamitousFelicitousness 7792b1ab62 fix(video): count generated frames on the first output axis
The shape branch read axis 1, which held the frame count back when animatediff
returned (batch, channels, frames, height, width). Diffusers now returns
(batch, frames, channels, height, width) and the modular video path puts
channels last, so axis 1 reads channels or height and the line printed a
plausible wrong number: a 124 frame 1024x576 generation logged frames=576.
len() is the frame count under both layouts and is what the sibling call site
in process_decode already uses.
2026-08-17 03:41:46 +01:00
CalamitousFelicitousness cce3a80b0c fix(video): correct codec option strings to the key=value form
parse_options reads : and , as separators and = as the only assignment, so a
segment without = becomes a valueless flag set to 1. The shipped strings used
ffmpeg command line spelling, which parses without error into other values.

- crf:16 parsed to {'crf': '1', '16': '1'}, encoding every api, framepack and
  seedvr video near lossless rather than at crf 16
- crf=23:b:v=0 pinned the generic bitrate option to 1 bit per second on vp8 and
  vp9, collapsing their output
- qscale:v=3 reached mpeg4 and mjpeg as nothing at all, replaced by an explicit
  quantizer range
- test-video-codecs.py asserts every preset segment carries an assignment
2026-08-17 03:04:59 +01:00
CalamitousFelicitousness 005fc5c86e refactor(video): accept video and audio references in the shared core
The core took reference images only, so no api caller could send the video and
audio references the ref2va workflow conditions on, and the marshalling that
handles them existed solely in the MiniMax tab.

validate_references now gates on the workflow and hands the entries to the
architecture that owns them, which accepts decoded images and local file paths
in any mix and preserves their order, since order fixes the labels a prompt
addresses. reference_caps exposes the same limits the validation enforces, so a
client reads them instead of mirroring the numbers.

- MAX_IMAGE_REFERENCES is gone: the limits now cover all three kinds and a total
- the run body no longer builds reference objects or knows their class
- an image is converted where it is built rather than at the call site, so a
  reference decoded from a file and one posted as base64 arrive the same way
- pipeline args summarize a reference list by kind, since a decoded video would
  otherwise print its frames into the per-generation log line
- the video endpoint documents what it actually accepts: images alone, because
  video and audio decode from files rather than from the wire, and an upload
  reference only where an extension provides the store that resolves one
2026-08-16 21:56:37 +01:00
CalamitousFelicitousness 9892a3f05f feat(minimax): add mixed-media reference caps and resolver
MiniMax-H3 conditions on image, video and audio references, and the limits it
enforces on them are constructor defaults on a block class the package does not
re-export, so they cannot be imported and are mirrored here instead.

The resolver takes decoded images and local file paths and returns the reference
objects the pipeline reads, checking cheapest first: classification and counts
open no files, container headers are read without decoding, and only then is the
media decoded. Everything runs before the model load, so a rejected request costs
nothing.

- reference limits as a frozen dataclass, keyed by workflow since the rows that
  carry ref2va differ only in which repo they load
- media classification and container probing as generic video helpers
- a url is refused before construction: the reference classes fetch one and
  decode whatever comes back
- a video is bounded by duration and by what it decodes to, since the pipeline
  truncates it to the generated length and the decode is held across the load
- the frame floor is counted on the decoded video at the rate it resamples to,
  which is what the conditioner measures
- torchaudio and av are checked up front rather than surfacing as an import
  failure once the weights are resident
2026-08-16 20:04:43 +01:00
Vladimir Mandic 6b499b7d17 cleanup
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 19:00:55 +02:00
Vladimir Mandic 7172fd3eb2 api auth for ws and api validate allowed paths
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 18:57:26 +02:00
Vladimir Mandic 290a620df3 update changelog
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 18:21:23 +02:00
Vladimir Mandic 8be5be487f Merge pull request #5028 from cjmcgee/fix/rocm-disable-mmap
fix(rocm): add option to load models without mmap
2026-08-16 18:19:38 +02:00
Vladimir Mandic ae8d559b50 swtich to igwn-segments
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 18:15:59 +02:00
Christopher McGee a9b9de63ab fix(rocm): add option to load models without mmap
On ROCm, host-to-device DMA from mmap'd safetensors pages stalls ~1s per
copy, so weights move to the GPU at ~27 MB/s instead of ~28 GB/s. With
offload enabled this re-copies weights every forward, so generation
appears to hang.

Adds `diffusers_disable_mmap` (Settings > Model Loading), off by default,
which makes diffusers read shards into anonymous memory instead. Costs
peak RAM equal to the model size, so it is opt-in.

SD3.5-large on RX 9070 (gfx1201), same prompt and steps:
  off: no image after 120s
  on:  image in 20s

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-16 11:46:07 -04:00
Vladimir Mandic 5b0a732db3 update codec presets
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 15:08:26 +02:00
Vladimir Mandic 0963bf54ac reduce group offload logging
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 12:45:50 +02:00
Vladimir Mandic ce418265e2 add lint full script
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 12:45:50 +02:00
Vladimir Mandic e3c57af560 pipeline init reordering
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 12:45:50 +02:00
Vladimir Mandic 76941efc7e strict typechecking
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 12:45:50 +02:00
Vladimir Mandic f30e6baa67 codespell
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 12:45:50 +02:00
Vladimir Mandic fbd0020ad4 refactor offloading
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 12:45:50 +02:00
Dity0 51a598bfc3 Enable smooth_k by default 2026-08-16 12:42:13 +03:00
Vladimir Mandic fd24630061 Merge pull request #5025 from vladmandic/fix/group-offload-roles
fix(offload): derive group offload roles structurally and unify dispatch
2026-08-16 09:06:13 +02:00
Vladimir Mandic 84eda5b9cf Merge branch 'dev' into fix/group-offload-roles 2026-08-16 09:06:01 +02:00
Vladimir Mandic cd25a5296a video loader use generic methods and auth
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-16 09:02:40 +02:00
CalamitousFelicitousness 79ea00257d fix(framepack): route placement through the offload dispatcher
The loader applied balanced offload directly, which places nothing when the
offload mode is not balanced, leaving every component on cpu where the load
parked it. The dispatcher places them under whichever mode is configured, and
the vae seams pair the balanced call with an on-demand sweep so the vae returns
to cpu once its outputs are materialized.
2026-08-15 21:30:52 +01:00
Vladimir Mandic 12bf006b00 improve state management
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-15 19:21:51 +02:00
Vladimir Mandic a6a6fb2aaa add minimax interpolation, video shift, audio shift
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-15 18:35:17 +02:00
Vladimir Mandic 87824ad0a3 update video codecs
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-15 14:23:18 +02:00
CalamitousFelicitousness 4a2d9c9720 test(offload): audit placement roles across the registered pipelines
Static inventory of every registered pipeline: component classes come from
the init type annotations, the component specs on modular pipelines, and
the video model definitions, so the real role function runs against real
classes with no weights loaded. The audit prints the role of every
component, lists which components turn resident under the shipped 22 GB
never-offload default, names the custom pipelines it cannot see, and
asserts that no component carries an undecorated entry point, that
opted-out classes route on-demand, and that every pipeline places a
per-step component.
2026-08-15 01:06:25 +01:00
CalamitousFelicitousness 09eeff30c7 refactor(settings): reorganize the offload settings by mode
The offload section interleaved shared and mode-specific options. The
page now reads top down: general options, an Offload Overrides section
holding the exclusions shared by balanced and group offload, then one
tuning section per mode. Use torch streams becomes Prefetch with streams
and Record torch streams becomes Overlap stream transfers, the section
headers carry hints, and the hints reflect live behavior, including
dropping the model-reload badge from options that apply on change.
2026-08-14 23:59:55 +01:00
CalamitousFelicitousness 3a17992060 test(offload): cover the group offload placement roles
Offline suite for the placement roles: the role table over the component
names sdnext loads, one dispatch arm per component with hooks landing on
text encoder wrappers, force sweeps scoped to stamped modules, a settings
change re-placing a resident component, on-demand contracts, enumeration
on both pipeline kinds, and the upstream markers the roles read.
2026-08-14 23:59:41 +01:00
CalamitousFelicitousness c95189bdda fix(mageflow): decorate the vae entry points for offload hooks
The mage vae defined plain encode and decode methods, leaving offload
hooks nothing to fire on when the pipeline enters through them. The
diffusers entry decorator routes both through the hook path, the same as
every stock autoencoder.
2026-08-14 23:59:35 +01:00
CalamitousFelicitousness 0d18bd9abe fix(offload): drive group offload from the offload settings
Group offload ignored the offload exclusion settings and its options took
effect only at the next model load. Components named by the never-offload
list or the model-type exclusion now stay resident on the accelerator,
with matching shared between the balanced hook and the group roles. The
offload options re-place loaded components when changed: group modes
re-run the placement pass, and balanced mode rebuilds its hook, which
snapshots the exclusion lists at construction.
2026-08-14 23:59:27 +01:00
CalamitousFelicitousness 15393b85ff fix(offload): scope force offload to managed components
The force sweep enumerated pipeline components and moved every module to
cpu, including components with no hook to bring them back. It now moves
only modules stamped for on-demand placement, walks the pipe variants
through the shared enumeration instead of the components property that can
raise, keeps going past a component that fails to move, and collects
garbage once per sweep rather than per module.
2026-08-14 23:58:57 +01:00
CalamitousFelicitousness 1cbc313fa5 fix(offload): derive group offload roles structurally and unify the dispatch
Group offload placed components by name matching, which sent every modular
text encoder through a second apply with the denoiser profile and missed
vae-class components not named vae. Placement now derives from the component:
an encode or decode entry bridge and an upstream group-offload opt-out both
take whole-module on-demand placement, an undecorated encode or decode entry
stays resident with a warning, denoiser slot names take the per-step profile,
and everything else takes the leaf profile. One pass serves classic and
modular pipelines, enumerating modular components from their specs, with
hooks landing on text encoder wrappers rather than their inner models. A
signature sentinel marks a component mid-apply; a failed apply is torn down
on the next pass. The pass logs the placement of every component.
2026-08-14 23:58:24 +01:00
Vladimir Mandic 807a9be6b5 del audio after processing
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-14 16:03:45 +02:00
Vladimir Mandic b0649e0ec1 group offloading changes
Signed-off-by: Vladimir Mandic <mandic00@live.com>
2026-08-14 15:59:51 +02:00