Download app.py from Hydrc68/Yso: direct link, hf CLI and curl.
- Browser
- Download file 562 Bytes
-
https://huggingface.co/spaces/Hydrc68/Yso/resolve/main/app.py
- Command line
-
hf download hf://spaces/Hydrc68/Yso/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Hydrc68/Yso/resolve/main/app.py
562 Bytes
| from diffusers import AutoencoderKL, UNet2DConditionModel, StableDiffusionPipeline, StableDiffusionImg2ImgPipeline, DPMSolverMultistepScheduler | |
| import gradio as gr | |
| import torch | |
| from PIL import Image | |
| import utils | |
| import datetime | |
| import time | |
| import psutil | |
| import random | |
| start_time = time.time() | |
| is_colab = utils.is_google_colab() | |
| state = None | |
| current_steps = 25 | |
| class Model: | |
| def __init__(self, name, path="", prefix=""): | |
| self.name = name | |
| self.path = path | |
| self.prefix = prefix | |
| self.pipe_t2i = None | |
| self.pipe_i2i = None |