Added training for an experimental decoratgor embedding. Allow for turning off guidance embedding on flux (for unreleased model). Various bug fixes and modifications

This commit is contained in:
Jaret Burkett committed 2024-12-15 08:59:27 -07:00
1 parent 92ce93140e
commit 8ef07a9c36
11 files changed
+182 -10

No files matched your search

+9
View File
@@ -39,6 +39,7 @@ def get_train_sd_device_state_preset(
train_lora: bool = False,
train_adapter: bool = False,
train_embedding: bool = False,
train_decorator: bool = False,
train_refiner: bool = False,
unload_text_encoder: bool = False,
require_grads: bool = True,
@@ -89,6 +90,14 @@ def get_train_sd_device_state_preset(
preset['unet']['requires_grad'] = False
preset['unet']['device'] = device
preset['text_encoder']['device'] = device
if train_decorator:
preset['text_encoder']['training'] = False
preset['text_encoder']['requires_grad'] = False
preset['text_encoder']['device'] = device
preset['unet']['training'] = True
preset['unet']['requires_grad'] = False
preset['unet']['device'] = device
if unload_text_encoder:
preset['text_encoder']['training'] = False