Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
import os
|
4 |
+
import sys
|
5 |
+
from pathlib import Path
|
6 |
+
import time
|
7 |
+
import random
|
8 |
+
from PIL import Image
|
9 |
+
|
10 |
+
m_pdir="/content/drive/MyDrive/aipic001/"
|
11 |
+
|
12 |
+
models =[
|
13 |
+
"",
|
14 |
+
"CompVis/stable-diffusion-v1-4",
|
15 |
+
"runwayml/stable-diffusion-v1-5",
|
16 |
+
"prompthero/openjourney",
|
17 |
+
#4
|
18 |
+
"stabilityai/stable-diffusion-2-1",
|
19 |
+
"stabilityai/stable-diffusion-2-1-base",
|
20 |
+
"andite/anything-v4.0",
|
21 |
+
|
22 |
+
"Linaqruf/anything-v3.0",
|
23 |
+
"eimiss/EimisAnimeDiffusion_1.0v",
|
24 |
+
"nitrosocke/Nitro-Diffusion",
|
25 |
+
#10
|
26 |
+
"wavymulder/portraitplus",
|
27 |
+
"22h/vintedois-diffusion-v0-1",
|
28 |
+
"dreamlike-art/dreamlike-photoreal-2.0",
|
29 |
+
#11
|
30 |
+
"dreamlike-art/dreamlike-diffusion-1.0",
|
31 |
+
"wavymulder/Analog-Diffusion",
|
32 |
+
"nitrosocke/redshift-diffusion",
|
33 |
+
"claudfuen/photorealistic-fuen-v1",
|
34 |
+
"prompthero/openjourney-v2",
|
35 |
+
"johnslegers/epic-diffusion",
|
36 |
+
"nitrosocke/Arcane-Diffusion",
|
37 |
+
"darkstorm2150/Protogen_x5.8_Official_Release",
|
38 |
+
|
39 |
+
]
|
40 |
+
|
41 |
+
model_1=models[1]
|
42 |
+
model_2=models[2]
|
43 |
+
model_3=models[3]
|
44 |
+
model_4=models[4]
|
45 |
+
model_5=models[5]
|
46 |
+
model_6=models[6]
|
47 |
+
model_7=models[7]
|
48 |
+
model_8=models[8]
|
49 |
+
model_9=models[9]
|
50 |
+
model_10=models[10]
|
51 |
+
model_11=models[11]
|
52 |
+
model_12=models[12]
|
53 |
+
model_13=models[13]
|
54 |
+
model_14=models[14]
|
55 |
+
model_15=models[15]
|
56 |
+
model_16=models[16]
|
57 |
+
model_17=models[17]
|
58 |
+
model_18=models[18]
|
59 |
+
model_19=models[19]
|
60 |
+
model_20=models[20]
|
61 |
+
|
62 |
+
|
63 |
+
text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link",live=True, preprocess=True)
|
64 |
+
|
65 |
+
proc1=gr.Interface.load(f"models/{model_1}",live=False,preprocess=True, postprocess=False)
|
66 |
+
proc2=gr.Interface.load(f"models/{model_2}",live=False,preprocess=True, postprocess=False)
|
67 |
+
proc3=gr.Interface.load(f"models/{model_3}",live=False,preprocess=True, postprocess=False)
|
68 |
+
"""
|
69 |
+
proc4=gr.Interface.load(f"models/{model_4}",live=False,preprocess=True, postprocess=False)
|
70 |
+
proc5=gr.Interface.load(f"models/{model_5}",live=False,preprocess=True, postprocess=False)
|
71 |
+
proc6=gr.Interface.load(f"models/{model_6}",live=False,preprocess=True, postprocess=False)
|
72 |
+
proc7=gr.Interface.load(f"models/{model_7}",live=False,preprocess=True, postprocess=False)
|
73 |
+
proc8=gr.Interface.load(f"models/{model_8}",live=False,preprocess=True, postprocess=False)
|
74 |
+
proc9=gr.Interface.load(f"models/{model_9}",live=False,preprocess=True, postprocess=False)
|
75 |
+
proc10=gr.Interface.load(f"models/{model_10}",live=False,preprocess=True, postprocess=False)
|
76 |
+
proc11=gr.Interface.load(f"models/{model_11}",live=False,preprocess=True, postprocess=False)
|
77 |
+
proc12=gr.Interface.load(f"models/{model_12}",live=False,preprocess=True, postprocess=False)
|
78 |
+
proc13=gr.Interface.load(f"models/{model_13}",live=False,preprocess=True, postprocess=False)
|
79 |
+
proc14=gr.Interface.load(f"models/{model_14}",live=False,preprocess=True, postprocess=False)
|
80 |
+
proc15=gr.Interface.load(f"models/{model_15}",live=False,preprocess=True, postprocess=False)
|
81 |
+
proc16=gr.Interface.load(f"models/{model_16}",live=False,preprocess=True, postprocess=False)
|
82 |
+
proc17=gr.Interface.load(f"models/{model_17}",live=False,preprocess=True, postprocess=False)
|
83 |
+
proc18=gr.Interface.load(f"models/{model_18}",live=False,preprocess=True, postprocess=False)
|
84 |
+
proc19=gr.Interface.load(f"models/{model_19}",live=False,preprocess=True, postprocess=False)
|
85 |
+
proc20=gr.Interface.load(f"models/{model_20}",live=False,preprocess=True, postprocess=False)
|
86 |
+
"""
|
87 |
+
|
88 |
+
gr.Parallel(proc1, proc2, proc3).launch()
|