mirror of
https://github.com/storytold/FineTrainers-Conditioning.git
synced 2026-10-18 07:33:20 +00:00
Used disable grad for component on lora fine tuning enabled
This commit is contained in:
@@ -390,6 +390,7 @@ class Trainer:
|
|||||||
self._enable_grad_for_components(components=[self.transformer])
|
self._enable_grad_for_components(components=[self.transformer])
|
||||||
else:
|
else:
|
||||||
logger.info("Lora Fine Tuning Enabled")
|
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
|
# 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.
|
# as these weights are only used for inference, keeping weights in full precision is not required.
|
||||||
|
|||||||
Reference in New Issue
Block a user