Omnibus commited on
Commit
2dd72e4
1 Parent(s): 90ef5ef

Create diff.py

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