Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,16 @@ import torch
|
|
| 4 |
import random
|
| 5 |
from huggingface_hub import snapshot_download
|
| 6 |
from diffusers import StableDiffusionXLPipeline, AutoencoderKL
|
| 7 |
-
from diffusers import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
from diffusers.models.attention_processor import AttnProcessor2_0
|
| 9 |
import gradio as gr
|
| 10 |
from PIL import Image
|
|
@@ -71,7 +80,14 @@ pipe_cyber.unet.set_attn_processor(AttnProcessor2_0())
|
|
| 71 |
samplers = {
|
| 72 |
"Euler a": EulerAncestralDiscreteScheduler.from_config(pipe_pony.scheduler.config),
|
| 73 |
"DPM++ SDE Karras": DPMSolverSDEScheduler.from_config(pipe_pony.scheduler.config, use_karras_sigmas=True),
|
| 74 |
-
"Heun": HeunDiscreteScheduler.from_config(pipe_pony.scheduler.config)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
}
|
| 76 |
|
| 77 |
DEFAULT_POSITIVE_PREFIX = "score_9, score_8_up, score_7_up, BREAK"
|
|
|
|
| 4 |
import random
|
| 5 |
from huggingface_hub import snapshot_download
|
| 6 |
from diffusers import StableDiffusionXLPipeline, AutoencoderKL
|
| 7 |
+
from diffusers import (
|
| 8 |
+
EulerAncestralDiscreteScheduler,
|
| 9 |
+
DPMSolverMultistepScheduler,
|
| 10 |
+
DPMSolverSDEScheduler,
|
| 11 |
+
HeunDiscreteScheduler,
|
| 12 |
+
DDIMScheduler,
|
| 13 |
+
LMSDiscreteScheduler,
|
| 14 |
+
PNDMScheduler,
|
| 15 |
+
UniPCMultistepScheduler,
|
| 16 |
+
)
|
| 17 |
from diffusers.models.attention_processor import AttnProcessor2_0
|
| 18 |
import gradio as gr
|
| 19 |
from PIL import Image
|
|
|
|
| 80 |
samplers = {
|
| 81 |
"Euler a": EulerAncestralDiscreteScheduler.from_config(pipe_pony.scheduler.config),
|
| 82 |
"DPM++ SDE Karras": DPMSolverSDEScheduler.from_config(pipe_pony.scheduler.config, use_karras_sigmas=True),
|
| 83 |
+
"Heun": HeunDiscreteScheduler.from_config(pipe_pony.scheduler.config),
|
| 84 |
+
# New samplers
|
| 85 |
+
"DPM++ 2M Karras": DPMSolverMultistepScheduler.from_config(pipe_pony.scheduler.config, use_karras_sigmas=True),
|
| 86 |
+
"DPM++ 2M": DPMSolverMultistepScheduler.from_config(pipe_pony.scheduler.config),
|
| 87 |
+
"DDIM": DDIMScheduler.from_config(pipe_pony.scheduler.config),
|
| 88 |
+
"LMS": LMSDiscreteScheduler.from_config(pipe_pony.scheduler.config),
|
| 89 |
+
"PNDM": PNDMScheduler.from_config(pipe_pony.scheduler.config),
|
| 90 |
+
"UniPC": UniPCMultistepScheduler.from_config(pipe_pony.scheduler.config),
|
| 91 |
}
|
| 92 |
|
| 93 |
DEFAULT_POSITIVE_PREFIX = "score_9, score_8_up, score_7_up, BREAK"
|