ComfyUI/comfy
liminfei-amd 62e025a4f3
Fix FP8 activation quantization for >2D activations in mixed_precision_ops (#14643)
mixed_precision_ops.Linear.forward only quantized activations that were 2D, or
3D (reshaped to 2D). Inputs with rank >= 4 (e.g. Anima's MLP activations, which
are not reshaped to 3D the way the attention path is) fell through the
`input_reshaped.ndim == 2` guard and reached scaled_mm as bf16, silently
dispatching a bf16 kernel instead of FP8. Since MLP is roughly half the compute,
the FP8 speedup was far below expectation.

Generalize the existing 3D->2D reshape to any rank >= 3 (flatten the leading
dims, keep the contraction dim) and reshape the output back to the original
leading dims. 2D and 3D inputs are handled exactly as before; only rank >= 4
inputs change (now quantized instead of skipped). This matches the rank-agnostic
handling already used by the training path (flatten(0, -2) / unflatten).

Fixes #14595.
2026-07-09 22:30:26 -04:00
..
audio_encoders
background_removal
cldm
comfy_types
extra_samplers
image_encoders Depth anything 3 (Core-135) (#13853) 2026-06-10 09:28:24 +08:00
k_diffusion
ldm Support gqa on all attention backends, drop support for pytorch 2.4 (#14772) 2026-07-07 22:57:52 -04:00
sd1_tokenizer
t2i_adapter
taesd
text_encoders Fix qwen3vl reference images when used as a text encode models. (#14845) 2026-07-09 01:50:25 -04:00
weight_adapter
bg_removal_model.py
cli_args.py add models-directory launch argument (#9113) 2026-07-08 22:20:47 +08:00
clip_config_bigg.json
clip_model.py
clip_vision_config_g.json
clip_vision_config_h.json
clip_vision_config_vitl_336_llava.json
clip_vision_config_vitl_336.json
clip_vision_config_vitl.json
clip_vision_siglip2_base_naflex.json
clip_vision_siglip_384.json
clip_vision_siglip_512.json
clip_vision.py
comfy_api_env.py feat: allow --comfy-api-base target ephemeral testenvs (#14569) 2026-07-08 23:20:10 -07:00
conds.py
context_windows.py feat: Context Windows sampling with LTX2 models and IC-LoRa guides (CORE-3) (#13325) 2026-06-20 07:47:31 +08:00
controlnet.py
deploy_environment.py
diffusers_convert.py
diffusers_load.py
float.py
gligen.py
hooks.py
latent_formats.py Revert "Add SeedVR2 support (CORE-6) (#14110)" (#14359) 2026-06-08 18:00:20 -04:00
lora_convert.py
lora.py feat: Support Krea2 (#14589) 2026-06-22 14:35:00 -07:00
memory_management.py
model_base.py feat: Support Krea2 (#14589) 2026-06-22 14:35:00 -07:00
model_detection.py feat: Support Krea2 (#14589) 2026-06-22 14:35:00 -07:00
model_management.py Try to fix the model reloading issue some people have. (#14822) 2026-07-09 16:39:01 -07:00
model_patcher.py [Trainer/bug] Ensure model is not inference mode (CORE-72) (#13400) 2026-06-09 23:07:47 -04:00
model_prefetch.py
model_sampling.py
multigpu.py
nested_tensor.py
ops.py Fix FP8 activation quantization for >2D activations in mixed_precision_ops (#14643) 2026-07-09 22:30:26 -04:00
options.py
patcher_extension.py
pinned_memory.py
pixel_space_convert.py
quant_ops.py Support convrot int4 models. (#14859) 2026-07-09 18:57:09 -04:00
rmsnorm.py
sample.py Revert "Add SeedVR2 support (CORE-6) (#14110)" (#14359) 2026-06-08 18:00:20 -04:00
sampler_helpers.py
samplers.py
sd1_clip_config.json
sd1_clip.py fix: error when embedding is loaded with models using llama_template (#14744) 2026-07-04 17:06:09 +08:00
sd.py Fix AttributeError in VAE.is_dynamic() for VAEs constructed without a patcher (#14826) 2026-07-08 16:01:43 -04:00
sdxl_clip.py
supported_models_base.py Revert "Add SeedVR2 support (CORE-6) (#14110)" (#14359) 2026-06-08 18:00:20 -04:00
supported_models.py More accurate memory usage factor for krea 2. (#14594) 2026-06-23 16:50:48 +08:00
utils.py feat: Support Krea2 (#14589) 2026-06-22 14:35:00 -07:00