File size: 2,891 Bytes
2dd72e4
 
 
 
40b07e2
2dd72e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232bf6d
2dd72e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147ef4c
2dd72e4
147ef4c
 
 
 
 
 
 
 
 
 
1
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
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
56
57
58
59
60
61
62
63
64
import gradio as gr
class SendIt:
    def __init__(self):
        
        models =[
            "",
            "CompVis/stable-diffusion-v1-4",
            "runwayml/stable-diffusion-v1-5",
            "prompthero/openjourney",
            "stabilityai/stable-diffusion-2-1",
            "stabilityai/stable-diffusion-2-1-base",
            "SG161222/Realistic_Vision_V1.4",
            "eimiss/EimisAnimeDiffusion_1.0v",
            "nitrosocke/Nitro-Diffusion",
            "wavymulder/portraitplus",
            "22h/vintedois-diffusion-v0-1",
            "dreamlike-art/dreamlike-photoreal-2.0",
            "dreamlike-art/dreamlike-diffusion-1.0",
            "wavymulder/Analog-Diffusion",
            "nitrosocke/redshift-diffusion",
            "claudfuen/photorealistic-fuen-v1",
            "prompthero/openjourney-v2",
            "johnslegers/epic-diffusion",
            "nitrosocke/Arcane-Diffusion",
            "darkstorm2150/Protogen_x5.8_Official_Release",
        
        ]
        
        self.models2=[
            gr.Interface.load(f"models/{models[1]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[2]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[3]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[4]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[5]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[6]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[7]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[8]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[9]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[10]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[11]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[12]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[13]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[14]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[15]}",live=True,preprocess=True),   
            gr.Interface.load(f"models/{models[16]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[17]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[18]}",live=True,preprocess=True),
            gr.Interface.load(f"models/{models[19]}",live=True,preprocess=True),
              
        
        ]
do_it=SendIt()
    
def send_it(inputs,model_choice=5, count = 1):
    t=0
    output_list=[]
    while t<int(count):
        proc1=do_it.models2[int(model_choice)]
        output1=proc1(inputs)
        output_list.append(output1)
        inputs=f"{inputs} "
        t+=1
    return(output_list)