Added ability to train control loras. Other important bug fixes thrown in

This commit is contained in:
Jaret Burkett
2025-03-14 18:03:00 -06:00
parent 391329dbdc
commit 3812957bc9
7 changed files with 365 additions and 19 deletions

View File

@@ -580,6 +580,8 @@ class BaseSDTrainProcess(BaseTrainProcess):
direct_save = True
if self.adapter_config.type == 'redux':
direct_save = True
if self.adapter_config.type == 'control_lora':
direct_save = True
save_ip_adapter_from_diffusers(
state_dict,
output_file=file_path,
@@ -1362,6 +1364,7 @@ class BaseSDTrainProcess(BaseTrainProcess):
self.adapter = CustomAdapter(
sd=self.sd,
adapter_config=self.adapter_config,
train_config=self.train_config,
)
self.adapter.to(self.device_torch, dtype=dtype)
if latest_save_path is not None and not is_control_net: