Exclude sensative layers from quantization on wan models

This commit is contained in:
Jaret Burkett
2026-07-10 08:56:05 -06:00
parent 883d60eb71
commit e7951ad29e
3 changed files with 14 additions and 0 deletions

View File

@@ -211,6 +211,12 @@ class Wan2214bModel(Wan21):
if not self.train_high_noise or not self.train_low_noise:
self.target_lora_modules = ["WanTransformer3DModel"]
def get_quantization_exclude_modules(self):
# the timestep/text conditioning embedders and the final projection feed
# every downstream modulation; keep them in full precision when quantizing.
# names are relative to each individual transformer (they quantize separately)
return ["condition_embedder*", "proj_out*"]
@property
def max_step_saves_to_keep_multiplier(self):
# the cleanup mechanism checks this to see how many saves to keep