Spaces:
Runtime error
Runtime error
Update dif.py
Browse files
dif.py
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
models2=[
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
]
|
53 |
-
|
54 |
-
|
55 |
-
def send_it(inputs,model_choice=5, count = 1):
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
1 |
import gradio as gr
|
2 |
+
class SendIt:
|
3 |
+
|
4 |
+
models =[
|
5 |
+
"",
|
6 |
+
"CompVis/stable-diffusion-v1-4",
|
7 |
+
"runwayml/stable-diffusion-v1-5",
|
8 |
+
"prompthero/openjourney",
|
9 |
+
"stabilityai/stable-diffusion-2-1",
|
10 |
+
"stabilityai/stable-diffusion-2-1-base",
|
11 |
+
"SG161222/Realistic_Vision_V1.4",
|
12 |
+
"Linaqruf/anything-v3.0",
|
13 |
+
"eimiss/EimisAnimeDiffusion_1.0v",
|
14 |
+
"nitrosocke/Nitro-Diffusion",
|
15 |
+
"wavymulder/portraitplus",
|
16 |
+
"22h/vintedois-diffusion-v0-1",
|
17 |
+
"dreamlike-art/dreamlike-photoreal-2.0",
|
18 |
+
"dreamlike-art/dreamlike-diffusion-1.0",
|
19 |
+
"wavymulder/Analog-Diffusion",
|
20 |
+
"nitrosocke/redshift-diffusion",
|
21 |
+
"claudfuen/photorealistic-fuen-v1",
|
22 |
+
"prompthero/openjourney-v2",
|
23 |
+
"johnslegers/epic-diffusion",
|
24 |
+
"nitrosocke/Arcane-Diffusion",
|
25 |
+
"darkstorm2150/Protogen_x5.8_Official_Release",
|
26 |
+
|
27 |
+
]
|
28 |
+
|
29 |
+
models2=[
|
30 |
+
gr.Interface.load(f"models/{models[1]}",live=True,preprocess=True),
|
31 |
+
gr.Interface.load(f"models/{models[2]}",live=True,preprocess=True),
|
32 |
+
gr.Interface.load(f"models/{models[3]}",live=True,preprocess=True),
|
33 |
+
gr.Interface.load(f"models/{models[4]}",live=True,preprocess=True),
|
34 |
+
gr.Interface.load(f"models/{models[5]}",live=True,preprocess=True),
|
35 |
+
gr.Interface.load(f"models/{models[6]}",live=True,preprocess=True),
|
36 |
+
gr.Interface.load(f"models/{models[7]}",live=True,preprocess=True),
|
37 |
+
gr.Interface.load(f"models/{models[8]}",live=True,preprocess=True),
|
38 |
+
gr.Interface.load(f"models/{models[9]}",live=True,preprocess=True),
|
39 |
+
gr.Interface.load(f"models/{models[10]}",live=True,preprocess=True),
|
40 |
+
gr.Interface.load(f"models/{models[11]}",live=True,preprocess=True),
|
41 |
+
gr.Interface.load(f"models/{models[12]}",live=True,preprocess=True),
|
42 |
+
gr.Interface.load(f"models/{models[13]}",live=True,preprocess=True),
|
43 |
+
gr.Interface.load(f"models/{models[14]}",live=True,preprocess=True),
|
44 |
+
gr.Interface.load(f"models/{models[15]}",live=True,preprocess=True),
|
45 |
+
gr.Interface.load(f"models/{models[16]}",live=True,preprocess=True),
|
46 |
+
gr.Interface.load(f"models/{models[17]}",live=True,preprocess=True),
|
47 |
+
gr.Interface.load(f"models/{models[18]}",live=True,preprocess=True),
|
48 |
+
gr.Interface.load(f"models/{models[19]}",live=True,preprocess=True),
|
49 |
+
gr.Interface.load(f"models/{models[20]}",live=True,preprocess=True),
|
50 |
+
|
51 |
+
|
52 |
+
]
|
53 |
+
|
54 |
+
|
55 |
+
def send_it(self,inputs,model_choice=5, count = 1):
|
56 |
+
if model_choice==None:
|
57 |
+
model_choice=5
|
58 |
+
t=0
|
59 |
+
output_list=[]
|
60 |
+
while t<int(count):
|
61 |
+
proc1=models2[int(model_choice)]
|
62 |
+
output1=proc1(inputs)
|
63 |
+
output_list.append(output1)
|
64 |
+
inputs=f"{inputs} "
|
65 |
+
t+=1
|
66 |
+
return(output_list)
|