Spaces:
Paused
Paused
gokaygokay
commited on
Commit
•
2991135
1
Parent(s):
24b9e51
Update app.py
Browse files
app.py
CHANGED
@@ -1,17 +1,24 @@
|
|
1 |
import os
|
2 |
import requests
|
|
|
|
|
3 |
import torch
|
|
|
4 |
from diffusers import StableDiffusionControlNetImg2ImgPipeline, ControlNetModel, DDIMScheduler
|
5 |
from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker
|
6 |
from diffusers.models import AutoencoderKL
|
|
|
|
|
7 |
from PIL import Image
|
8 |
-
from RealESRGAN import RealESRGAN
|
9 |
import cv2
|
10 |
import numpy as np
|
11 |
-
|
|
|
|
|
12 |
import gradio as gr
|
|
|
|
|
13 |
import spaces
|
14 |
-
import time
|
15 |
|
16 |
USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
|
17 |
ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
|
|
|
1 |
import os
|
2 |
import requests
|
3 |
+
import time
|
4 |
+
|
5 |
import torch
|
6 |
+
|
7 |
from diffusers import StableDiffusionControlNetImg2ImgPipeline, ControlNetModel, DDIMScheduler
|
8 |
from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker
|
9 |
from diffusers.models import AutoencoderKL
|
10 |
+
from diffusers.models.attention_processor import AttnProcessor2_0
|
11 |
+
|
12 |
from PIL import Image
|
|
|
13 |
import cv2
|
14 |
import numpy as np
|
15 |
+
|
16 |
+
from RealESRGAN import RealESRGAN
|
17 |
+
|
18 |
import gradio as gr
|
19 |
+
from gradio_imageslider import ImageSlider
|
20 |
+
|
21 |
import spaces
|
|
|
22 |
|
23 |
USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
|
24 |
ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
|