Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,8 @@ adapter_id = "seawolf2357/nsfw-detection" # Changed to Renoir model
|
|
29 |
|
30 |
# Initialize pipeline with PEFT support
|
31 |
print("Loading pipeline...")
|
32 |
-
|
|
|
33 |
print("Loading LoRA weights...")
|
34 |
pipeline.load_lora_weights(adapter_id)
|
35 |
pipeline = pipeline.to(device)
|
|
|
29 |
|
30 |
# Initialize pipeline with PEFT support
|
31 |
print("Loading pipeline...")
|
32 |
+
# Add 'use_peft=True' parameter to enable PEFT support
|
33 |
+
pipeline = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.bfloat16, use_peft=True)
|
34 |
print("Loading LoRA weights...")
|
35 |
pipeline.load_lora_weights(adapter_id)
|
36 |
pipeline = pipeline.to(device)
|