Spaces:
Sleeping
Sleeping
Update app.py
Browse filesadd DPMSolverMultistepScheduler
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)
|