mirror of
https://github.com/storytold/FineTrainers-Conditioning.git
synced 2026-10-09 00:09:45 +00:00
Used disable grad for component on lora fine tuning enabled
This commit is contained in:
@@ -390,7 +390,8 @@ class Trainer:
|
||||
self._enable_grad_for_components(components=[self.transformer])
|
||||
else:
|
||||
logger.info("Lora Fine Tuning Enabled")
|
||||
|
||||
self._disable_grad_for_components(components=[self.transformer])
|
||||
|
||||
# For mixed precision training we cast all non-trainable weights (vae, text_encoder and transformer) to half-precision
|
||||
# as these weights are only used for inference, keeping weights in full precision is not required.
|
||||
weight_dtype = self._get_training_dtype(accelerator=self.state.accelerator)
|
||||
|
||||
Reference in New Issue
Block a user