DiZH797 commited on
Commit
a0aeec6
·
verified ·
1 Parent(s): a54485c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -59,6 +59,12 @@ def get_pipe(model_id: str, lora_scale: float = 1.0):
59
  LORA_MODEL_ID, weight_name="merged_lora_weights.safetensors"
60
  )
61
  pipe.fuse_lora(lora_scale=lora_scale)
 
 
 
 
 
 
62
  else:
63
  # Load a standard model without LoRA
64
  pipe = DiffusionPipeline.from_pretrained(
 
59
  LORA_MODEL_ID, weight_name="merged_lora_weights.safetensors"
60
  )
61
  pipe.fuse_lora(lora_scale=lora_scale)
62
+ # После загрузки LoRA
63
+ print("Loaded LoRA weights:")
64
+ for name, param in pipe.unet.named_parameters():
65
+ if "lora" in name.lower() and param.requires_grad:
66
+ print(f"LoRA layer: {name}, shape: {param.shape}")
67
+ break
68
  else:
69
  # Load a standard model without LoRA
70
  pipe = DiffusionPipeline.from_pretrained(