seawolf2357 commited on
Commit
a8c3250
·
verified ·
1 Parent(s): 4a73dac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- pipeline = DiffusionPipeline.from_pretrained(repo_id, torch_dtype=torch.bfloat16)
 
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)