Repository navigation
Studio: per-family diffusion tables move into the family registries - #13536
Conversation
Quant excludes, pads, ConvRot, NVFP4 zero-row guards, scheme and train denies, auto preferences, bf16-when-resident, TE int8 schedules, untiled VAE coefficients, preview factor keys, auto static step skip rows and trusted repo extras now live on DiffusionFamily.profile / VideoFamily.profile (family_profile.FamilyProfile). The consumer modules keep their table names, derived from the registries, so call sites and lookups are unchanged. Labels and the trainable video set come from the registry rows, the content video set from the video registry, and both registries spell the reduction-filter flags the same way. The freeze test resolves identically.
compile_static and stg_compile_adapter live on the ltx-2 / ltx-2.5 profiles; the hooks read them through profile_for, which also resolves a stand-in family object by its registry name.
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Second step of the diffusion auto-optimizer (after #13520): a new model should be data, not edits across about 25 side tables. The per-family tables move into the family registries as a
FamilyProfilesection, so adding a family is one registry row plus only the values that differ from the defaults.core/inference/family_profile.pydefinesFamilyProfile; everyDiffusionFamily/VideoFamilyrow carries it asprofile, with the reasoning comments moved next to the data. It holds the transformer quant policy (int8 excludes and pads, ConvRot, nvfp4 zero-row tokens, scheme denies, training denies, auto preferences, bf16-when-resident), the text-encoder int8 schedule, the untiled VAE coefficients, the preview factor key, the auto step-skip rows, extra trusted repos, the two LTX compile flags, andquant_names(the quant tables also answer the legacyltx-2.3key).label(training labels derive from it) and, on video,trainable(TRAINABLE_VIDEO_FAMILIESderives from it). The content module's video-family set, both trusted-repo sets (base repo, variant bases, training bases and prequant variant bases plus explicit extras) and the reduction-config filters now come from the registries.diffusion.pyandvideo.pychange by one block each.ltx_static_compileandltx_stg_compile_adapterhooks from Studio: diffusion auto-optimizer core shared by the image and video load paths #13520 readcompile_static/stg_compile_adapterfrom the profile instead of a hard-coded family list.Published checkpoints keep validating. Exclude, ConvRot and policy sets are baked into the hosted prequant files and checked at load (the file's exclude tokens must cover the runtime's). The new freeze test pins every resolved value so this refactor cannot move them.
Testing
tests/test_diffusion_family_data_freeze.py, fixturetests/fixtures/diffusion_family_data_freeze.json): for every image and video family plusNone,"", an unknown name and odd spellings, every scheme's exclude / pad / zero-row tokens, ConvRot spec, filename, repo and variant repos, ConvRot default-on, bf16-when-resident, TE int8 mode, preview key and content page, plus every raw table, sample untiled VAE byte counts, step-skip rows, cudnn and reduction flags, labels, the trainable set, both trusted-repo sets and the generation defaults. The fixture was generated on a clean current-main checkout and the branch reproduces it byte for byte.Adding a family now
diffusion_families.pyorvideo_families.pywith an optionallabel,trainable, the reduction / cudnn flags, andprofile = FamilyProfile(...)holding only the non-default fields.FACTORSif it has a live preview; the row names its key.UNSLOTH_FREEZE_UPDATE=1 pytest tests/test_diffusion_family_data_freeze.pyand a review of the JSON diff. If a family with a published prequant file changes its exclude, ConvRot or zero-row tokens, that file has to be rebuilt.Left as they were: the checkpoint-name generation default tables (they match names like "distilled" or "fusionx", not just base repos), the arch-wide auto ladder, the NVFP4 policy constants, the TE ConvRot and H3 file lists and compile metadata such as
_VERIFIED_BLOCKS. Frontend labels and defaults and catalog rows are still hand-edited.