* ovis_image: fix guidance_scale / max_sequence_length / batched-CFG / precomputed embeds + add pipeline test
Addresses items 3/4/5/6/7 of #13630.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* ovis_image: complete pipeline review (#13630)
- thread joint_attention_kwargs through the transformer forward + blocks
(item 2) and pass it from the pipeline's transformer calls.
- encode_prompt now returns both positive and negative embeds (the z_image /
PixArt convention) so precomputed embeds work end-to-end and the prompt is
encoded in a single call.
- switch the pipeline test to the full PipelineTesterMixin.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* ovis_image: remove now-unused tokenizer_max_length
The pipeline computes max_length inline from max_sequence_length, so the attribute is dead. Addresses review feedback.
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* Ideogram4 DreamBooth LoRA training
Add examples/dreambooth/train_dreambooth_lora_ideogram4.py + README + requirements:
- DreamBooth LoRA training for Ideogram 4 (flow-matching, dual transformer, Qwen3-VL TE)
- nf4 QLoRA and SDNQ fp8 bases: --do_fp8_training trains the fp8 checkpoint in place
(scaled matmul), or omit it to dequantize the SDNQ base to bf16
- --disable_training_autocast (Ideogram4's forward is corrupted by autocast)
- structured JSON caption support + --upsample_prompt
- model card with a validation-image gallery
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Apply style fixes
* Fix base model repo reference in Ideogram4 LoRA README
* Align Ideogram4 script deps with requirements file
---------
Co-authored-by: linoytsaban <linoy.tsaban@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
* Fix Kohya LoRA conversion for Z-Image modules whose names contain underscores
_convert_non_diffusers_z_image_lora_to_diffusers reverses Kohya's `.`->`_`
flattening with a blanket `_`->`.` split, guarded only by a small
protected-n-gram list (attention to_q/k/v/out, feed_forward) plus post-hoc
fixes for context_refiner/noise_refiner. Z-Image's other modules whose names
contain underscores were over-split: all_final_layer, all_x_embedder,
adaLN_modulation, cap_embedder and t_embedder came out as all.final.layer,
adaLN.modulation, ... and failed to load with "unexpected keys".
Extend the existing dot->underscore post-normalization to re-merge these
names, so Kohya (lora_unet_) Z-Image LoRAs load.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Fix Kohya LoRA conversion for Qwen top-level (non-block) modules
_convert_non_diffusers_qwen_lora_to_diffusers's convert_key hardcodes the
transformer_blocks prefix and assumes every lora_unet_ key lives under a block:
it strips a transformer_blocks_ prefix and re-prepends transformer_blocks.,
which collapses the top-level modules (img_in, txt_in, proj_out, norm_out.linear,
time_text_embed.timestep_embedder.linear_1/2) onto each other. They end up as
transformer_blocks..weight / ...a.down.weight and trip the 'state_dict should be
empty' guard.
Resolve these six modules via an explicit flattened->dotted map before the block
logic runs, preserving the .lora_down/.lora_up/.alpha suffix, so Kohya (lora_unet_)
Qwen LoRAs load.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* add doc pages for the discrete ddim and entropy bound schedulers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* fix the cited paper titles to match the linked papers
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Support loading non-diffusers Krea 2 LoRAs (ComfyUI / AI-Toolkit)
Krea 2 LoRAs in the wild are trained against the original krea-ai/krea-2
module names and ship under either the `diffusion_model.` prefix (Krea 2
reference trainer / ComfyUI exports) or the `base_model.model.` prefix
(Ostris AI-Toolkit exports). Add a converter that maps these onto the
diffusers Krea2Transformer2DModel names so they load directly via
`Krea2Pipeline.load_lora_weights`.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Skip layerwise casting tests on devices without float8_e4m3fn support
* Xfail float8 layerwise casting tests on MPS
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* Fix Kohya UNet LoRA key conversion for conv_in/conv_out/time_embedding
_convert_unet_lora_key() had no mapping for these three top-level UNet
submodules, so Kohya-format keys touching them (e.g. lora_unet_conv_in,
lora_unet_time_embed_0/2) came out as conv.in/conv.out/time.embed.0/2
instead of conv_in/conv_out/time_embedding.linear_1/2, and were
reported as unexpected keys instead of being applied.
* Handle both sgm and diffusers spellings for conv/time_embedding keys
The initial fix mapped conv_in/conv_out in the diffusers spelling (conv.in/
conv.out) and time_embedding in the sgm spelling (time_embed.0/.2), so neither
SD1.x nor SDXL was fully covered. Add the missing spellings:
- sgm conv_in/conv_out: input_blocks.0.0 / out.2 (kohya-ss SDXL sgm UNet),
mapped before the block renames so input_blocks.0.0 does not become
down_blocks.0.0.
- diffusers time_embedding: time_embedding.linear_1/2 (kohya-ss trains SD1.x on
the diffusers UNet).
Verified against kohya-ss source (sdxl_original_unet.py, networks/lora.py) and
the diffusers UNet module names; regression set unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Map SDXL sgm label_emb LoRA keys and pass UNet top-level modules through
The conv_in/conv_out/time_embedding fix only reached _convert_unet_lora_key;
for the SDXL sgm UNet those keys never got there, because
_maybe_map_sgm_blocks_to_diffusers treats every non-text key as a down/mid/up
block. The top-level modules that live outside that block structure
(time_embed, label_emb, out = conv_out, and input_blocks.0.0 = conv_in) hit the
"layer not supported" raise, or crashed the inner block-index int() parse.
- Pass those top-level modules through unchanged so _convert_unet_lora_key maps
them, instead of block-remapping or raising.
- Map the sgm label_emb (SDXL added-conditioning MLP) to diffusers add_embedding:
label_emb.0.0/0.2 -> add_embedding.linear_1/2, before the SDXL index-strip
heuristic that would otherwise collapse the layer index.
All additions follow the kohya/sgm naming pattern and are no-ops on real
kohya-ss files (which contain none of these top-level UNet LoRA keys); verified
end-to-end loading a full SDXL sgm UNet LoRA into the diffusers pipeline with no
unexpected/missing adapter keys.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* docs: fix repeated word typo in set_timesteps docstring
Removed the duplicate word "schedule" from the docstring for the sigmas argument in EulerDiscreteScheduler.set_timesteps.
* Update scheduling_euler_discrete.py
* Apply style fixes
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
fix(cosmos3): pin VAE latent norm buffers to encode output device
Under sharded placement (device_map="balanced"), vae.encode() runs on the
VAE's own device while the mean/inv_std buffers were pinned to x.device,
causing a cross-device RuntimeError. Compute raw_mu first, then pin the
normalization buffers to its device so all tensors share one device.
Co-authored-by: Atharva Joshi <atjoshi@smc521ge-0036.ipp2a2.colossus.nvidia.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
SkyReels-V2 and ChronoEdit are both built on Wan, and their transformers have
the same keys as WanTransformer3DModel, so they reuse
convert_wan_transformer_to_diffusers (like WanVACE / WanAnimate). This lets the
community GGUF builds load directly.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Add discrete DDIM and entropy bound schedulers and a uniform mode for block refinement
* Add DiffusionGemma block-diffusion pipeline
* Add DiffusionGemma pipeline tests and docs
* Put DiffusionGemma docs under the Text pipelines section
* Add static cache and fullgraph-compiled decoder path to DiffusionGemma pipeline
* Compile decoder externally for the static cache path instead of a pipeline flag
* Prefill the encoder once into a reusable cache and sync default denoising steps
* Support image prompts by forwarding pixel_values to the encoder prefill
* Restyle docstrings to satisfy doc-builder
* Sort the new scheduler and pipeline exports
* Let any of the three schedulers drive the pipeline
* Document the schedulers and updated defaults in the pipeline docs
* Sort the scheduler dummy objects
* Set scheduler sampling knobs on the scheduler config, not the pipeline call
* Accept raw prompt/image/messages instead of pre-tokenized model inputs
* Add leave-one-out predictor-corrector to DiscreteDDIM scheduler
Adds optional Gibbs corrector sweeps after each predictor step for
uniform diffusion, recovering the LOO denoiser in closed form so it
works on the released checkpoint with no retraining.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Forward PEFT adapter API on the DiffusionGemma pipeline
The denoiser is a Transformers model, so adapters (LoRA, DoRA, ...) load
through its native PEFT integration rather than the diffusers LoRA loader.
Also dispatch the predictor-corrector by scheduler capability instead of class.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Fix callback kwargs gathering on Python < 3.12
Build callback_kwargs with a loop instead of a dict comprehension, whose
own scope hides locals() on pre-3.12 (PEP 709), causing KeyError: 'canvas'.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Speed up diffusion gemma sampling to match transformers
Add adaptive stopping (stop a block once its prediction is stable and
confident) and make the decoder compile cudagraph-safe via
cudagraph_mark_step_begin + logits clone. ~175 -> ~372 tok/s. Also align
the decoder mask with the new transformers#46654 layout.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Enable adaptive stopping by default
Default confidence_threshold to 0.005 to match the released checkpoint
and transformers, so the speedup is on out of the box.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Fold corrector sweeps into the step budget
Run fewer predictor steps and spend the freed forwards on the corrector,
so predictor-corrector sampling costs the same total forwards as plain
ancestral (~2x faster), matching the paper.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Commit the converged prediction on adaptive stop
Ancestral schedulers like DiscreteDDIM only clean the canvas on the final
step, so stopping early left noise tokens. Use the denoiser argmax instead,
which is the converged answer and matches the canvas for commit schedulers.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* anneal sampling temperature and fix static cache decoder mask
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Update src/diffusers/pipelines/diffusion_gemma/pipeline_diffusion_gemma.py
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* Update src/diffusers/schedulers/scheduling_entropy_bound.py
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* Update src/diffusers/pipelines/diffusion_gemma/pipeline_diffusion_gemma.py
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* address dg845 review comments
* fix entropy scheduler temperature scaling
* update decoder mask for new transformers
* self-condition on the temperature-shaped logits
* move temperature annealing into EntropyBoundScheduler
* self-condition on the entropy scheduler's shaped logits
* show torch.compile + static cache in the usage example
* removed wrong commit
* Update src/diffusers/pipelines/diffusion_gemma/pipeline_diffusion_gemma.py
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* address review comments
* expose pred_logits on all schedulers
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* implement base model output caching in model-level tests
* single quotes
* memory
---------
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* [.ai] document single-file model layout and "don't reimplement DiffusionPipeline"
Two conventions that weren't written down, surfaced while reviewing a new
model/pipeline port:
- models.md: add a "Single-file model layout" section. A model lives in one
self-contained `transformer_<name>.py`; reuse shared blocks from
normalization.py/attention.py/embeddings.py and inline model-specific
variants with `# Copied from` rather than creating per-model
`attention_processor_<name>.py` / `block_<name>.py` / `rope_<name>.py`
companion files (no precedent for these in the repo).
- pipelines.md: add gotcha #7, "Don't reimplement DiffusionPipeline." A
subclass adds only pipeline-specific steps; device placement, offloading,
execution-device resolution, and module registration already exist on the
base class. No custom device/offload manager, no `device=` arg on
`__call__`, no `set_<component>` setters.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* [.ai] generalize single-file model layout section
Drop the implementation-specific examples (Lumina class names, per-model
transformer_*.py citations) and state the single-file policy generally:
everything (attention, blocks, RoPE, model-specific layers) in one model
file, with shared blocks either imported from the common modules or brought
in via `# Copied from ... with Old->New`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* [.ai] trim redundant don't-split sentence from single-file section
The positive statement (everything in one model file) already conveys it;
drop the companion-module filename list and the editorializing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* [.ai] generalize the "don't reimplement DiffusionPipeline" gotcha
State the principle and the canonical base APIs; drop the implementation-
specific anti-pattern callouts (enable_*_flag booleans, set_<component>
setters, the device= arg, a shadow self.execution_device).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* [.ai] pare gotcha #7 down to the principle
Drop the per-category API bullets; one sentence — don't add device
placement, offloading, or component loading/registration logic on a
subclass, it's on the base class. Can expand later if needed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* [.ai] renumber gotchas after merge: component-mutation #7, reimplement #8
main's newly merged "don't modify registered component on the fly" keeps #7;
our "don't reimplement DiffusionPipeline" becomes #8 (appended after it).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* [.ai] add blank line between gotchas 7 and 8
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Update .ai/models.md
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* port final set of model tests and others
* fix extracter.
* fix cuda tests for models.
* Revert "fix extracter."
This reverts commit 178c4cb99b.
* Revert "port final set of model tests and others"
This reverts commit a92c70c081.
* fix more
* address reviewer feedback
---------
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* Add Krea 2 LoRA DreamBooth trainer + Krea2 LoRA loader
Adds examples/dreambooth/train_dreambooth_lora_krea2.py and the
Krea2LoraLoaderMixin (Krea2Pipeline now inherits it) so LoRA adapters
can be saved/loaded for the Krea 2 transformer. The transformer/pipeline
forward now accept attention_kwargs for runtime LoRA scaling.
Co-Authored-By: linoytsaban <linoy.tsaban@gmail.com>
* inline _pack/_unpack_latents in trainer (pipeline methods are instance methods)
* add Krea2LoraLoaderMixin to LoRA loaders docs
* remove mu from validation call to align with pipeline on main
---------
Co-authored-by: linoytsaban <linoy.tsaban@gmail.com>
Co-authored-by: Linoy Tsaban <57615435+linoytsaban@users.noreply.github.com>
Refine .ai attention-mask and component-mutation guidance from a PR review
- models.md: clarify padding-mask bullet — pass None when padding is
uniform (mask.all()) or when the model is trained to tolerate padding
without a mask
- pipelines.md: add gotcha #7 — don't mutate registered component state
per call; prefer an already-prepared component, otherwise snapshot and
restore (PAG pattern)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
Adds Krea2Transformer2DModel and Krea2Pipeline: a flow-matching
text-to-image MMDiT with grouped-query attention, Qwen3-VL text
conditioning, and the Qwen-Image VAE.
Co-authored-by: Elea Zhong <elea@krea.ai>
Co-authored-by: Naga Sai Abhinay Devarinti <devarintinagasaiabhinay@gmail.com>
* Fix `Ideogram4MRoPE` collapsing under `torch.autocast` (compute rotary in float32)
Ideogram4 builds image-token positions as IMAGE_POSITION_OFFSET (65536) + (t, h, w).
`Ideogram4MRoPE.forward` casts its operands to float32, but the rotary matmul (and
cos/sin) is on autocast's downcast list, so under torch.autocast("cuda", bfloat16) —
common in training and pipeline code — it runs in bfloat16 anyway. bfloat16's step at
65536 is 512, so every image position in a <=512 grid rounds to the same value: all
image tokens get identical rotary embeddings, spatial information is lost, and the
decoded image degenerates to a flat color.
Wrap the frequency computation in torch.autocast(enabled=False) so the rotary
embeddings are always computed in float32, matching how transformers guards its RoPE
modules. Added a regression test that fails on main and passes with the fix.
Fixes#13920
* Compute the rotary frequencies in float64 instead of disabling autocast
Per review: replace the torch.autocast(enabled=False) guard with a float64 computation,
which autocast does not downcast — matching the float64 rope path used elsewhere (Flux).
The autocast and float32 paths stay bit-identical (max|delta|=0).
* Disable autocast for Ideogram4 rope matmul instead of using float64
Per review, use torch.autocast(enabled=False) around the rotary matmul (as
the original implementation did) rather than computing in float64, and adopt
the clearer comment describing the bfloat16 collapse at the 65536 offset.
* Disable autocast for ernie_image and helios rope einsum
Extend the Ideogram4 fix: ernie_image's `rope` and helios's
`get_frequency_batched` build rotary freqs with an unguarded float32
einsum over raw position ids. Under an ambient autocast the einsum runs in
bfloat16 on CUDA, which cannot represent consecutive integers past 256, so
positions degrade — the same bug, matching the guards mochi/omnigen already
have. Wrap each in torch.autocast(enabled=False).
* Disable autocast for Cosmos3 VL-text rope matmul
Cosmos3VLTextRotaryEmbedding builds its interleaved-mrope freqs with an
unguarded position-id matmul (same shape as Ideogram4), so an ambient autocast
downcasts it to bfloat16 and collapses positions past 256. Wrap in
torch.autocast(enabled=False).
* Tighten autocast(enabled=False) to just the rope matmul
Per review, scope the guard to the precision-sensitive position-id matmul
in Ideogram4 and Cosmos3 rather than the whole freqs block (ernie_image and
helios already wrap only the einsum).
---------
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* Fix LTX2 connector register layout to match the original LTX implementation
The connector replaced left-padding positions with the tiled registers and
then flipped the whole sequence, which put the prompt tokens at the front in
reversed order and the register tile reversed within each block. The original
LTX implementation (ltx-core _replace_padded_with_learnable_registers, also
matched by ComfyUI) front-aligns the valid tokens in their original order and
fills the tail with registers indexed by absolute position.
Since the connector blocks apply RoPE, the reversed layout produces
off-distribution embeddings; short prompts (e.g. negative prompts, whose
context is mostly registers) are hit hardest, which manifests as overblown
CFG: at cfg > 1 (or CFG++ samplers at cfg 1) the unconditional branch is
computed from a mostly-register context with scrambled positions.
Replace the fill+flip with a stable-argsort gather (valid tokens to the
front, order preserved, per batch row) and fill the tail with the
absolute-position register tile.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Add register-layout regression tests for the LTX2 text connectors
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* add Ideogram4LoraLoaderMixin
* Support loading non-diffusers Ideogram4 LoRA checkpoints (#13919)
support loading non-diffusers Ideogram4 LoRAs
* add Ideogram4 LoRA loader tests
* support call-time LoRA scaling via attention_kwargs in Ideogram4
* fix and un-skip Ideogram4 LoRA loader tests
* document attention_kwargs in Ideogram4 forward and pipeline
* style Ideogram4 attention_kwargs docstrings
* fix Ideogram4 LoRA loader CI test failures
- pipeline: run the text encoder on its parameters' current device, then
move features to the execution device, so encode_prompt works under
enable_model_cpu_offload. The pipeline calls the text encoder's submodules
directly to tap intermediate layers, which bypasses accelerate's onload
hook, so the weights stay on CPU while inputs are on the execution device.
Fixes test_lora_loading_model_cpu_offload.
- tests: override test_lora_fuse_nan to corrupt a weight under Ideogram4's
`layers` tower (the base test probes transformer_blocks/blocks/etc.).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* address review nits on Ideogram4 LoRA loader
- pipeline: clarify the te_device comment (per review) — explain the CpuOffload hook
attaches to forward, why submodule calls bypass it, and that te_device is the offload
device under enable_model_cpu_offload.
- tests: drop the unused `import sys` and `sys.path.append(".")`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
Adds a pixel-space variant of PRX that denoises raw RGB directly
(no VAE), conditioned on a Qwen3-VL text encoder:
- PRXTransformer2DModel: new optional config args `bottleneck_size`
(two-layer img_in projection for large patch dims) and
`resolution_embeds` (PRXResolutionEmbedder conditions the timestep
modulation on the latent resolution)
- PRXPipeline: support for subclass-tuned tokenizer max length, light
text cleaning, x-prediction flow matching (x0 -> velocity conversion),
and non-unit initial noise scale
- PRXPixelPipeline: thin subclass wiring the above together
(vae optional/None, vae_scale_factor=1, 1024px default)
- conversion script support for the pixel checkpoint format
- registration in __init__ files + dummy objects, docs autodoc entry,
fast pipeline tests
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* update
* update
* update
* update
* [CI] Refactor SD3 Transformer Test (#13340)
* update
* update
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* refactor unet tests (3d_condition, motion, controlnetxs) (#13897)
* refactor unet_3d_condition tests
* refactor unet_motion tests
* refactor unet_controlnetxs tests
* refactor unet_1d tests (#13898)
* refactor unet_1d tests
* use per-sample output_shape for unet_1d tests
---------
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* refactor unet_2d tests (#13901)
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* [chore] log quant config to the user_agent (#13850)
log quant config to the user_agent
* Integrate AutoRound into Diffusers (#13552)
* support auto_round
Signed-off-by: Xin He <xin3.he@intel.com>
* add document and unit tests
Signed-off-by: Xin He <xin3.he@intel.com>
* fix CI
Signed-off-by: Xin He <xin3.he@intel.com>
* Apply suggestions from code review
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
* update document and overwrite the default quantization_config with specified backend.
Signed-off-by: Xin He <xin3.he@intel.com>
* add UT and fix bug
Signed-off-by: Xin He <xin3.he@intel.com>
* update per comments
Signed-off-by: Xin He <xin3.he@intel.com>
* update per comments
Signed-off-by: Xin He <xin3.he@intel.com>
* fix compile error in doc
Signed-off-by: Xin He <xin3.he@intel.com>
* Apply style fixes
* small nits
* Add auto_round dependency to the versions table
Signed-off-by: Xin He <xin3.he@intel.com>
* fix make deps_table_check_updated
Signed-off-by: Xin He <xin3.he@intel.com>
* fix CI
Signed-off-by: Xin He <xin3.he@intel.com>
---------
Signed-off-by: Xin He <xin3.he@intel.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
* [tests] refactor UNet model tests to align with the new pattern (#13153)
* refactor unet2d condition model tests.
* fix tests
* up
* fix
* Revert "fix"
This reverts commit 46d44b73d8.
* up
* recompile limit
* [tests] refactor test_models_unet_1d.py to use modular testing mixins
Refactor UNet1D model tests to follow the modern testing pattern using
BaseModelTesterConfig and focused mixin classes (ModelTesterMixin,
MemoryTesterMixin, TrainingTesterMixin, LoraTesterMixin).
Both UNet1D standard and RL variants now have separate config classes
and dedicated test classes organized by concern (core, memory, training,
LoRA, hub loading).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* [tests] refactor test_models_unet_2d.py to use modular testing mixins
Refactor UNet2D model tests (standard, LDM, NCSN++) to follow the
modern testing pattern. Each variant gets its own config class and
dedicated test classes organized by concern (core, memory, training,
LoRA, hub loading).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* [tests] refactor test_models_unet_3d_condition.py to use modular testing mixins
Refactor UNet3DConditionModel tests to follow the modern testing pattern
with separate classes for core, attention, memory, training, and LoRA.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* [tests] refactor test_models_unet_controlnetxs.py to use modular testing mixins
Refactor UNetControlNetXSModel tests to follow the modern testing
pattern with separate classes for core, memory, training, and LoRA.
Specialized tests (from_unet, freeze_unet, forward_no_control,
time_embedding_mixing) remain in the core test class.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* [tests] refactor test_models_unet_spatiotemporal.py to use modular testing mixins
Refactored the spatiotemporal UNet test file to follow the modern modular testing
pattern with BaseModelTesterConfig and focused test classes:
- UNetSpatioTemporalTesterConfig: Base configuration with model setup
- TestUNetSpatioTemporal: Core model tests (ModelTesterMixin, UNetTesterMixin)
- TestUNetSpatioTemporalAttention: Attention-related tests (AttentionTesterMixin)
- TestUNetSpatioTemporalMemory: Memory/offloading tests (MemoryTesterMixin)
- TestUNetSpatioTemporalTraining: Training tests (TrainingTesterMixin)
- TestUNetSpatioTemporalLoRA: LoRA adapter tests (LoraTesterMixin)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* remove test suites that are passed.
* fix consistencydecodervae tests
* Revert "fix consistencydecodervae tests"
This reverts commit 41b036b989.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* [tests] fix vidtok tests (#13894)
* fix vidtok tests
* style
* Update tests/models/autoencoders/test_models_autoencoder_vidtok.py
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
* Apply style fixes
---------
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* clean up
---------
Signed-off-by: Xin He <xin3.he@intel.com>
Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
Co-authored-by: Akshan Krithick <97239696+akshan-main@users.noreply.github.com>
Co-authored-by: Xin He <xin3.he@intel.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>