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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user