artificiallover0 commited on
Commit
597feb6
·
verified ·
1 Parent(s): 5d454e2

Update app.py

Browse files

add DPMSolverMultistepScheduler

Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import numpy as np
3
  import random
4
  import spaces #[uncomment to use ZeroGPU]
5
- from diffusers import DiffusionPipeline
6
  import torch
7
  from huggingface_hub import login
8
  import os
@@ -18,6 +18,7 @@ else:
18
  torch_dtype = torch.float32
19
 
20
  pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
 
21
  pipe.load_lora_weights("artificiallover0/man_asshole")
22
  pipe.fuse_lora()
23
  pipe = pipe.to(device)
 
2
  import numpy as np
3
  import random
4
  import spaces #[uncomment to use ZeroGPU]
5
+ from diffusers import DiffusionPipeline ,DPMSolverMultistepScheduler ,EulerDiscreteScheduler
6
  import torch
7
  from huggingface_hub import login
8
  import os
 
18
  torch_dtype = torch.float32
19
 
20
  pipe = DiffusionPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
21
+ pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
22
  pipe.load_lora_weights("artificiallover0/man_asshole")
23
  pipe.fuse_lora()
24
  pipe = pipe.to(device)