Omnibus commited on
Commit
701190d
1 Parent(s): 8169761

Update dif.py

Browse files
Files changed (1) hide show
  1. dif.py +65 -65
dif.py CHANGED
@@ -1,66 +1,66 @@
1
  import gradio as gr
2
-
3
- models =[
4
- "",
5
- "CompVis/stable-diffusion-v1-4",
6
- "runwayml/stable-diffusion-v1-5",
7
- "prompthero/openjourney",
8
- "stabilityai/stable-diffusion-2-1",
9
- "stabilityai/stable-diffusion-2-1-base",
10
- "SG161222/Realistic_Vision_V1.4",
11
- "Linaqruf/anything-v3.0",
12
- "eimiss/EimisAnimeDiffusion_1.0v",
13
- "nitrosocke/Nitro-Diffusion",
14
- "wavymulder/portraitplus",
15
- "22h/vintedois-diffusion-v0-1",
16
- "dreamlike-art/dreamlike-photoreal-2.0",
17
- "dreamlike-art/dreamlike-diffusion-1.0",
18
- "wavymulder/Analog-Diffusion",
19
- "nitrosocke/redshift-diffusion",
20
- "claudfuen/photorealistic-fuen-v1",
21
- "prompthero/openjourney-v2",
22
- "johnslegers/epic-diffusion",
23
- "nitrosocke/Arcane-Diffusion",
24
- "darkstorm2150/Protogen_x5.8_Official_Release",
25
-
26
- ]
27
- current_model = models[5]
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(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)
 
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)