Rework merge_network_on_save to handle dequantization on merging and saving for much more efficient full finetuning.

This commit is contained in:
Jaret Burkett
2026-06-25 13:19:38 -06:00
parent 6ecff36f26
commit 5f04ae7ad5
8 changed files with 147 additions and 41 deletions

View File

@@ -3138,6 +3138,12 @@ class StableDiffusion:
# override in child classes to get transformer block names for lora targeting
return None
def get_quantization_exclude_modules(self) -> Optional[List[str]]:
# override in child classes to keep sensitive modules in full precision when
# quantizing. Returns fnmatch patterns matched against the transformer's module
# names (e.g. "model.x_embedder*").
return None
def get_base_model_version(self) -> str:
if self.is_pixart:
return 'pixart'