Skip to content

Commit 328e0d2

Browse files
authored
[training] set rest of the blocks with requires_grad False. (#10607)
set rest of the blocks with requires_grad False.
1 parent 23b467c commit 328e0d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/flux-control/train_control_flux.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,8 @@ def main(args):
812812
for name, module in flux_transformer.named_modules():
813813
if "transformer_blocks" in name:
814814
module.requires_grad_(True)
815+
else:
816+
module.requirs_grad_(False)
815817

816818
def unwrap_model(model):
817819
model = accelerator.unwrap_model(model)

0 commit comments

Comments
 (0)