1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

removing redundant requires_grad = False (#10628)

We already set the unet to requires grad false at line 506

Co-authored-by: Aryan <aryan@huggingface.co>
This commit is contained in:
Yaniv Galron
2025-01-23 23:55:33 +02:00
committed by GitHub
parent 37c9697f5b
commit a451c0ed14

View File

@@ -515,10 +515,6 @@ def main():
elif accelerator.mixed_precision == "bf16":
weight_dtype = torch.bfloat16
# Freeze the unet parameters before adding adapters
for param in unet.parameters():
param.requires_grad_(False)
unet_lora_config = LoraConfig(
r=args.rank,
lora_alpha=args.rank,