Shad0ws RankJet commited on
Commit
cc937ba
β€’
0 Parent(s):

Duplicate from rankjet/BulkImgVariations

Browse files

Co-authored-by: RankJet <rankjet@users.noreply.huggingface.co>

Files changed (4) hide show
  1. .gitattributes +34 -0
  2. README.md +13 -0
  3. app.py +185 -0
  4. index.html +16 -0
.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Maximum Multiplier
3
+ emoji: πŸ›•πŸ›•
4
+ colorFrom: green
5
+ colorTo: blue
6
+ sdk: gradio
7
+ sdk_version: 3.15.0
8
+ app_file: app.py
9
+ pinned: true
10
+ duplicated_from: rankjet/BulkImgVariations
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+ import sys
4
+ from pathlib import Path
5
+
6
+ models = [
7
+ {"name": "--------ART---------", "url": "dreamlike-art/dreamlike-anime-1.0"},
8
+ {"name": "Dreamlike Diffusion", "url": "dreamlike-art/dreamlike-diffusion-1.0"},
9
+ {"name": "Openjourney", "url": "prompthero/openjourney"},
10
+ {"name": "Openjourney V2", "url": "prompthero/openjourney-v2"},
11
+ {"name": "Vintedois 1.0", "url": "22h/vintedois-diffusion-v0-1"},
12
+ {"name": "Vintedois 2.0", "url": "22h/vintedois-diffusion-v0-2"},
13
+ {"name": "--------ANIME-------", "url": "dreamlike-art/dreamlike-anime-1.0"},
14
+ {"name": "Abyss Orange Mix", "url": "WarriorMama777/AbyssOrangeMix"},
15
+ {"name": "Abyss Orange Mix 2", "url": "WarriorMama777/AbyssOrangeMix2"},
16
+ {"name": "All 526 Animated", "url": "stablediffusionapi/all-526-animated"},
17
+ {"name": "Anireal 3D V2", "url": "circulus/sd-anireal-3d-v2"},
18
+ {"name": "Anything 2.1", "url": "swl-models/anything-v2.1"},
19
+ {"name": "Anything 4.0", "url": "andite/anything-v4.0"},
20
+ {"name": "Anything 5.0", "url": "stablediffusionapi/anything-v5"},
21
+ {"name": "Anything Else 4", "url": "stablediffusionapi/anythingelse-v4"},
22
+ {"name": "Anything Else 5", "url": "stablediffusionapi/anything-v5"},
23
+ {"name": "CamelliaMix","url": "Powidl43/CamelliaMix"},
24
+ {"name": "CamelliaMix Line","url": "stablediffusionapi/camelliamixline"},
25
+ {"name": "CamelliaMix 2.5D","url": "stablediffusionapi/camelliamix25d"},
26
+ {"name": "Chik Mix", "url": "stablediffusionapi/chikmix"},
27
+ {"name": "Counterfeit 1.0", "url": "gsdf/counterfeit-v1.0"},
28
+ {"name": "Counterfeit 2.0", "url": "gsdf/Counterfeit-V2.0"},
29
+ {"name": "Counterfeit 3.0", "url": "stablediffusionapi/counterfeit-v30"},
30
+ {"name": "Chillout App Factory","url": "stablediffusionapi/chillout-app-factory"},
31
+ {"name": "CuteSexyRobutts", "url": "andite/cutesexyrobutts-diffusion"},
32
+ {"name": "Dark Sushi Mix", "url": "stablediffusionapi/dark-sushi-mix"},
33
+ {"name": "Dash Sushi 25d", "url": "stablediffusionapi/dark-sushi-25d"},
34
+ {"name": "Dreamlike Anime", "url": "dreamlike-art/dreamlike-anime-1.0"},
35
+ {"name": "Eimis Anime Diffusion", "url": "eimiss/EimisAnimeDiffusion_1.0v"},
36
+ {"name": "Guweiz Diffusion", "url": "andite/guweiz-diffusion"},
37
+ {"name": "Hiten Diffusion", "url": "andite/hiten-diffusion"},
38
+ {"name": "InkPunk Diffusion", "url": "Envvi/Inkpunk-Diffusion"},
39
+ {"name": "Mashuu Diffusion", "url": "andite/mashuu-diffusion"},
40
+ {"name": "Mignon Diffusion", "url": "andite/mignon-diffusion"},
41
+ {"name": "MikaPikazo Diffusion", "url": "andite/mikapikazo-diffusion"},
42
+ {"name": "Pastel Mix", "url": "andite/pastel-mix"},
43
+ {"name": "Piromizu Diffusion", "url": "andite/piromizu-diffusion"},
44
+ {"name": "Protogen X 5.8", "url": "darkstorm2150/Protogen_x5.8_Official_Release"},
45
+ {"name": "Protogen X 3.4", "url": "darkstorm2150/Protogen_x3.4_Official_Release"},
46
+ {"name": "Protogen 2.2", "url": "darkstorm2150/Protogen_v2.2_Official_Release"},
47
+ {"name": "Protogen Infinity", "url": "darkstorm2150/Protogen_Infinity_Official_Release"},
48
+ {"name": "Stable Diffusion 1.4","url": "CompVis/stable-diffusion-v1-4"},
49
+ {"name": "Stable Diffusion 1.5","url": "runwayml/stable-diffusion-v1-5"},
50
+ {"name": "Stable Diffusion 2.1","url": "stabilityai/stable-diffusion-2-1"},
51
+ {"name": "Stable Diffusion 2.1 Base","url": "stabilityai/stable-diffusion-2-1-base"},
52
+ {"name": "Stable Diffusion 2.1 Unclip","url": "stabilityai/stable-diffusion-2-1-unclip"},
53
+ {"name": "---Photoreal Models---", "url": "wavymulder/Analog-Diffusion"},
54
+ {"name": "Analog Diffusion", "url": "wavymulder/Analog-Diffusion"},
55
+ {"name": "Collage Diffusion", "url": "wavymulder/collage-diffusion"},
56
+ {"name": "Dreamlike Photoreal", "url": "dreamlike-art/dreamlike-photoreal-2.0"},
57
+ {"name": "Lomo Diffusion", "url": "wavymulder/lomo-diffusion"},
58
+ {"name": "Model Shoot", "url": "wavymulder/modelshoot"},
59
+ {"name": "Portrait Plus", "url": "wavymulder/portraitplus"},
60
+ {"name": "Portrait plus", "url": "wavymulder/portraitplus"},
61
+ {"name": "Realistic Vision V 1.4", "url": "SG161222/Realistic_Vision_V1.4"},
62
+ {"name": "Timeless Diffusion", "url": "wavymulder/timeless-diffusion"},
63
+ {"name": "Wavyfusion", "url": "wavymulder/wavyfusion"},
64
+ {"name": "-----NitroSocke-----", "url": "nitrosocke/Arcane-Diffusion"},
65
+ {"name": "Arcane Diffusion", "url": "nitrosocke/Arcane-Diffusion"},
66
+ {"name": "Archer Diffusion", "url": "nitrosocke/archer-diffusion"},
67
+ {"name": "Classic Anime", "url": "nitrosocke/classic-anim-diffusion"},
68
+ {"name": "Elden Ring", "url": "nitrosocke/elden-ring-diffusion"},
69
+ {"name": "Future Diffusion", "url": "nitrosocke/Future-Diffusion"},
70
+ {"name": "Ghibli Diffusion", "url": "nitrosocke/Ghibli-Diffusion"},
71
+ {"name": "Mo-Di Diffusion", "url": "nitrosocke/mo-di-diffusion"},
72
+ {"name": "Nitro Diffusion", "url": "nitrosocke/Nitro-Diffusion"},
73
+ {"name": "Redshift Diffusion", "url": "nitrosocke/redshift-diffusion"},
74
+ {"name": "Redshift Diffusion 768", "url": "nitrosocke/redshift-diffusion-768"},
75
+ {"name": "Spider Verse diffusion", "url": "nitrosocke/spider-verse-diffusion"},
76
+ ]
77
+
78
+ current_model = models[0]
79
+
80
+ text_gen = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
81
+
82
+ models2 = []
83
+ for model in models:
84
+ model_url = f"models/{model['url']}"
85
+ loaded_model = gr.Interface.load(model_url, live=True, preprocess=True)
86
+ models2.append(loaded_model)
87
+
88
+
89
+ def text_it(inputs, text_gen=text_gen):
90
+ return text_gen(inputs)
91
+
92
+
93
+ def set_model(current_model_index):
94
+ global current_model
95
+ current_model = models[current_model_index]
96
+ return gr.update(label=f"{current_model['name']}")
97
+
98
+
99
+ def send_it(inputs, model_choice):
100
+ proc = models2[model_choice]
101
+ return proc(inputs)
102
+
103
+
104
+ css = """"""
105
+
106
+ with gr.Blocks(css=css) as myface:
107
+ gr.HTML(
108
+ """<!DOCTYPE html>
109
+ <html lang="en">
110
+ <head>
111
+ <meta charset="utf-8" />
112
+ <meta name="twitter:card" content="player"/>
113
+ <meta name="twitter:site" content=""/>
114
+ <meta name="twitter:player" content="https://omnibus-maximum-multiplier-places.hf.space"/>
115
+ <meta name="twitter:player:stream" content="https://omnibus-maximum-multiplier-places.hf.space"/>
116
+ <meta name="twitter:player:width" content="100%"/>
117
+ <meta name="twitter:player:height" content="600"/>
118
+ <meta property="og:title" content="Embedded Live Viewer"/>
119
+ <meta property="og:description" content="Tweet Genie - A Huggingface Space"/>
120
+ <meta property="og:image" content="https://cdn.glitch.global/80dbe92e-ce75-44af-84d5-74a2e21e9e55/omnicard.png?v=1676772531627"/>
121
+ <!--<meta http-equiv="refresh" content="0; url=https://huggingface.co/spaces/corbt/tweet-genie">-->
122
+ </head>
123
+ </html>
124
+ """
125
+ )
126
+
127
+ with gr.Row():
128
+ with gr.Row():
129
+ input_text = gr.Textbox(label="Prompt idea", lines=1)
130
+ # Model selection dropdown
131
+ model_name1 = gr.Dropdown(
132
+ label="Choose Model",
133
+ choices=[m["name"] for m in models],
134
+ type="index",
135
+ value=current_model["name"],
136
+ interactive=True,
137
+ )
138
+ with gr.Row():
139
+ see_prompts = gr.Button("Generate Prompts")
140
+ run = gr.Button("Generate Images", variant="primary")
141
+ with gr.Tab("Main"):
142
+ with gr.Row():
143
+ output1 = gr.Image(label=f"{current_model['name']}")
144
+ output2 = gr.Image(label=f"{current_model['name']}")
145
+ output3 = gr.Image(label=f"{current_model['name']}")
146
+ output4 = gr.Image(label=f"{current_model['name']}")
147
+ with gr.Row():
148
+ magic1 = gr.Textbox(lines=4)
149
+ magic2 = gr.Textbox(lines=4)
150
+ magic3 = gr.Textbox(lines=4)
151
+ magic4 = gr.Textbox(lines=4)
152
+
153
+ with gr.Row():
154
+ output5 = gr.Image(label=f"{current_model['name']}")
155
+ output6 = gr.Image(label=f"{current_model['name']}")
156
+ output7 = gr.Image(label=f"{current_model['name']}")
157
+ output8 = gr.Image(label=f"{current_model['name']}")
158
+ with gr.Row():
159
+ magic5 = gr.Textbox(lines=4)
160
+ magic6 = gr.Textbox(lines=4)
161
+ magic7 = gr.Textbox(lines=4)
162
+ magic8 = gr.Textbox(lines=4)
163
+
164
+ model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8])
165
+
166
+ run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
167
+ run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
168
+ run.click(send_it, inputs=[magic3, model_name1], outputs=[output3])
169
+ run.click(send_it, inputs=[magic4, model_name1], outputs=[output4])
170
+ run.click(send_it, inputs=[magic5, model_name1], outputs=[output5])
171
+ run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
172
+ run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
173
+ run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
174
+
175
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
176
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
177
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic3])
178
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic4])
179
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic5])
180
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
181
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
182
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
183
+
184
+ myface.queue(concurrency_count=200)
185
+ myface.launch(inline=True, show_api=False, max_threads=400)
index.html ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="twitter:card" content="player"/>
6
+ <meta name="twitter:site" content=""/>
7
+ <meta name="twitter:player" content="https://omnibus-maximum-multiplier-places.hf.space"/>
8
+ <meta name="twitter:player:stream" content="https://omnibus-maximum-multiplier-places.hf.space"/>
9
+ <meta name="twitter:player:width" content="100%"/>
10
+ <meta name="twitter:player:height" content="600"/>
11
+ <meta property="og:title" content="Embedded Live Viewer"/>
12
+ <meta property="og:description" content="Tweet Genie - A Huggingface Space"/>
13
+ <meta property="og:image" content="https://cdn.glitch.global/80dbe92e-ce75-44af-84d5-74a2e21e9e55/omnicard.png?v=1676772531627"/>
14
+ <!--<meta http-equiv="refresh" content="0; url=https://huggingface.co/spaces/corbt/tweet-genie">-->
15
+ </head>
16
+ </html>