Spaces:
Sleeping
Sleeping
Add dependencies
Browse files- .gitignore +1 -0
- app.py +32 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
\venv\
|
app.py
CHANGED
@@ -1,4 +1,36 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def greet(name):
|
4 |
return "Hello " + name + "!!"
|
|
|
1 |
+
import spaces
|
2 |
+
import torch
|
3 |
import gradio as gr
|
4 |
+
from gradio import processing_utils, utils
|
5 |
+
from PIL import Image
|
6 |
+
import random
|
7 |
+
from diffusers import (
|
8 |
+
DiffusionPipeline,
|
9 |
+
AutoencoderKL,
|
10 |
+
StableDiffusionControlNetPipeline,
|
11 |
+
ControlNetModel,
|
12 |
+
StableDiffusionLatentUpscalePipeline,
|
13 |
+
StableDiffusionImg2ImgPipeline,
|
14 |
+
StableDiffusionControlNetImg2ImgPipeline,
|
15 |
+
DPMSolverMultistepScheduler, # <-- Added import
|
16 |
+
EulerDiscreteScheduler # <-- Added import
|
17 |
+
)
|
18 |
+
import tempfile
|
19 |
+
import time
|
20 |
+
from share_btn import community_icon_html, loading_icon_html, share_js
|
21 |
+
import user_history
|
22 |
+
from illusion_style import css
|
23 |
+
|
24 |
+
|
25 |
+
BASE_MODEL = "SG161222/Realistic_Vision_V5.1_noVAE"
|
26 |
+
|
27 |
+
|
28 |
+
if torch.cuda.is_available():
|
29 |
+
device='gpu'
|
30 |
+
else:
|
31 |
+
device='cpu'
|
32 |
+
|
33 |
+
|
34 |
|
35 |
def greet(name):
|
36 |
return "Hello " + name + "!!"
|