AdamOswald1 commited on
Commit
8a19abc
1 Parent(s): 7ad2d01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +177 -164
app.py CHANGED
@@ -76,6 +76,26 @@ from huggingface_hub import login
76
 
77
  is_colab = utils.is_google_colab()
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  class Model:
80
  def __init__(self, name, path, prefix):
81
  self.name = name
@@ -90,151 +110,151 @@ models = [
90
  Model("Archer", "nitrosocke/archer-diffusion", "archer style"),
91
  Model("Elden Ring", "nitrosocke/elden-ring-diffusion", "elden ring style"),
92
  Model("Spider-Verse", "nitrosocke/spider-verse-diffusion", "spiderverse style"),
93
- Model("Modern Disney", "nitrosocke/modern-disney-diffusion", "modern disney style"),
94
- Model("Classic Disney", "nitrosocke/classic-anim-diffusion", "classic disney style"),
95
- Model("Waifu", "hakurei/waifu-diffusion", ""),
96
- Model("Pokémon", "lambdalabs/sd-pokemon-diffusers", "pokemon style"),
97
- Model("Pokémon", "svjack/Stable-Diffusion-Pokemon-en", "pokemon style"),
98
- Model("Pony Diffusion", "AstraliteHeart/pony-diffusion", "pony style"),
99
- Model("Robo Diffusion", "nousr/robo-diffusion", "robo style"),
100
- Model("Cyberpunk Anime", "DGSpitzer/Cyberpunk-Anime-Diffusion, flax/Cyberpunk-Anime-Diffusion", "cyberpunk style"),
101
- Model("Cyberpunk Anime", "DGSpitzer/Cyberpunk-Anime-Diffusion", "cyberpunk style"),
102
- Model("Cyberpunk Anime", "flax/Cyberpunk-Anime-Diffusion", "cyberpunk style"),
103
- Model("Cyberware", "Eppinette/Cyberware", "cyberware"),
104
- Model("Tron Legacy", "dallinmackay/Tron-Legacy-diffusion", "trnlgcy"),
105
- Model("Waifu", "flax/waifu-diffusion", ""),
106
- Model("Dark Souls", "Guizmus/DarkSoulsDiffusion", "dark souls style"),
107
- Model("Waifu", "technillogue/waifu-diffusion", ""),
108
- Model("Ouroborus", "Eppinette/Ouroboros", "m_ouroboros style"),
109
- Model("Ouroborus alt", "Eppinette/Ouroboros", "m_ouroboros"),
110
- Model("Waifu", "Eppinette/Mona", "Mona"),
111
- Model("Waifu", "Eppinette/Mona", "Mona Woman"),
112
- Model("Waifu", "Eppinette/Mona", "Mona Genshin"),
113
- Model("Genshin", "Eppinette/Mona", "Mona"),
114
- Model("Genshin", "Eppinette/Mona", "Mona Woman"),
115
- Model("Genshin", "Eppinette/Mona", "Mona Genshin"),
116
- Model("Space Machine", "rabidgremlin/sd-db-epic-space-machine", "EpicSpaceMachine"),
117
- Model("Spacecraft", "rabidgremlin/sd-db-epic-space-machine", "EpicSpaceMachine"),
118
- Model("TARDIS", "Guizmus/Tardisfusion", "Classic Tardis style"),
119
- Model("TARDIS", "Guizmus/Tardisfusion", "Modern Tardis style"),
120
- Model("TARDIS", "Guizmus/Tardisfusion", "Tardis Box style"),
121
- Model("Spacecraft", "Guizmus/Tardisfusion", "Classic Tardis style"),
122
- Model("Spacecraft", "Guizmus/Tardisfusion", "Modern Tardis style"),
123
- Model("Spacecraft", "Guizmus/Tardisfusion", "Tardis Box style"),
124
- Model("CLIP", "EleutherAI/clip-guided-diffusion", "CLIP"),
125
- Model("Face Swap", "felixrosberg/face-swap", "faceswap"),
126
- Model("Face Swap", "felixrosberg/face-swap", "faceswap with"),
127
- Model("Face Swap", "felixrosberg/face-swap", "faceswapped"),
128
- Model("Face Swap", "felixrosberg/face-swap", "faceswapped with"),
129
- Model("Face Swap", "felixrosberg/face-swap", "face on"),
130
- Model("Waifu", "Fampai/lumine_genshin_impact", "lumine_genshin"),
131
- Model("Waifu", "Fampai/lumine_genshin_impact", "lumine"),
132
- Model("Waifu", "Fampai/lumine_genshin_impact", "Lumine Genshin"),
133
- Model("Waifu", "Fampai/lumine_genshin_impact", "Lumine_genshin"),
134
- Model("Waifu", "Fampai/lumine_genshin_impact", "Lumine_Genshin"),
135
- Model("Waifu", "Fampai/lumine_genshin_impact", "Lumine"),
136
- Model("Genshin", "Fampai/lumine_genshin_impact", "Lumine_genshin"),
137
- Model("Genshin", "Fampai/lumine_genshin_impact", "Lumine_Genshin"),
138
- Model("Genshin", "Fampai/lumine_genshin_impact", "Lumine"),
139
- Model("Genshin", "Fampai/lumine_genshin_impact", "Lumine Genshin"),
140
- Model("Genshin", "Fampai/lumine_genshin_impact", "lumine"),
141
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Ganyu"),
142
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Ganyu Woman"),
143
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Ganyu Genshin"),
144
- Model("Waifu", "sd-concepts-library/ganyu-genshin-impact", "Ganyu"),
145
- Model("Waifu", "sd-concepts-library/ganyu-genshin-impact", "Ganyu Woman"),
146
- Model("Waifu", "sd-concepts-library/ganyu-genshin-impact", "Ganyu Genshin"),
147
- Model("Waifu", "Fampai/raiden_genshin_impact", "raiden_ei"),
148
- Model("Waifu", "Fampai/raiden_genshin_impact", "Raiden Ei"),
149
- Model("Waifu", "Fampai/raiden_genshin_impact", "Ei Genshin"),
150
- Model("Waifu", "Fampai/raiden_genshin_impact", "Raiden Genshin"),
151
- Model("Waifu", "Fampai/raiden_genshin_impact", "Raiden_Genshin"),
152
- Model("Waifu", "Fampai/raiden_genshin_impact", "Ei_Genshin"),
153
- Model("Waifu", "Fampai/raiden_genshin_impact", "Raiden"),
154
- Model("Waifu", "Fampai/raiden_genshin_impact", "Ei"),
155
- Model("Genshin", "Fampai/raiden_genshin_impact", "Raiden Ei"),
156
- Model("Genshin", "Fampai/raiden_genshin_impact", "raiden_ei"),
157
- Model("Genshin", "Fampai/raiden_genshin_impact", "Raiden"),
158
- Model("Genshin", "Fampai/raiden_genshin_impact", "Raiden Genshin"),
159
- Model("Genshin", "Fampai/raiden_genshin_impact", "Ei Genshin"),
160
- Model("Genshin", "Fampai/raiden_genshin_impact", "Raiden_Genshin"),
161
- Model("Genshin", "Fampai/raiden_genshin_impact", "Ei_Genshin"),
162
- Model("Genshin", "Fampai/raiden_genshin_impact", "Ei"),
163
- Model("Waifu", "Fampai/hutao_genshin_impact", "hutao_genshin"),
164
- Model("Waifu", "Fampai/hutao_genshin_impact", "HuTao_Genshin"),
165
- Model("Waifu", "Fampai/hutao_genshin_impact", "HuTao Genshin"),
166
- Model("Waifu", "Fampai/hutao_genshin_impact", "HuTao"),
167
- Model("Waifu", "Fampai/hutao_genshin_impact", "hutao_genshin"),
168
- Model("Genshin", "Fampai/hutao_genshin_impact", "hutao_genshin"),
169
- Model("Genshin", "Fampai/hutao_genshin_impact", "HuTao_Genshin"),
170
- Model("Genshin", "Fampai/hutao_genshin_impact", "HuTao Genshin"),
171
- Model("Genshin", "Fampai/hutao_genshin_impact", "HuTao"),
172
- Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Female"),
173
- Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "female"),
174
- Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Woman"),
175
- Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "woman"),
176
- Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Girl"),
177
- Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "girl"),
178
- Model("Genshin", "Fampai/lumine_genshin_impact", "Female"),
179
- Model("Genshin", "Fampai/lumine_genshin_impact", "female"),
180
- Model("Genshin", "Fampai/lumine_genshin_impact", "Woman"),
181
- Model("Genshin", "Fampai/lumine_genshin_impact", "woman"),
182
- Model("Genshin", "Fampai/lumine_genshin_impact", "Girl"),
183
- Model("Genshin", "Fampai/lumine_genshin_impact", "girl"),
184
- Model("Genshin", "Eppinette/Mona", "Female"),
185
- Model("Genshin", "Eppinette/Mona", "female"),
186
- Model("Genshin", "Eppinette/Mona", "Woman"),
187
- Model("Genshin", "Eppinette/Mona", "woman"),
188
- Model("Genshin", "Eppinette/Mona", "Girl"),
189
- Model("Genshin", "Eppinette/Mona", "girl"),
190
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Female"),
191
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "female"),
192
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Woman"),
193
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "woman"),
194
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Girl"),
195
- Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "girl"),
196
- Model("Genshin", "Fampai/raiden_genshin_impact", "Female"),
197
- Model("Genshin", "Fampai/raiden_genshin_impact", "female"),
198
- Model("Genshin", "Fampai/raiden_genshin_impact", "Woman"),
199
- Model("Genshin", "Fampai/raiden_genshin_impact", "woman"),
200
- Model("Genshin", "Fampai/raiden_genshin_impact", "Girl"),
201
- Model("Genshin", "Fampai/raiden_genshin_impact", "girl"),
202
- Model("Genshin", "Fampai/hutao_genshin_impact", "Female"),
203
- Model("Genshin", "Fampai/hutao_genshin_impact", "female"),
204
- Model("Genshin", "Fampai/hutao_genshin_impact", "Woman"),
205
- Model("Genshin", "Fampai/hutao_genshin_impact", "woman"),
206
- Model("Genshin", "Fampai/hutao_genshin_impact", "Girl"),
207
- Model("Genshin", "Fampai/hutao_genshin_impact", "girl"),
208
- Model("Waifu", "crumb/genshin-stable-inversion, yuiqena/GenshinImpact, Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Genshin"),
209
- Model("Waifu", "crumb/genshin-stable-inversion, yuiqena/GenshinImpact, Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Genshin Impact"),
210
- Model("Genshin", "crumb/genshin-stable-inversion, yuiqena/GenshinImpact, Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", ""),
211
- Model("Waifu", "crumb/genshin-stable-inversion", "Genshin"),
212
- Model("Waifu", "crumb/genshin-stable-inversion", "Genshin Impact"),
213
- Model("Genshin", "crumb/genshin-stable-inversion", ""),
214
- Model("Waifu", "yuiqena/GenshinImpact", "Genshin"),
215
- Model("Waifu", "yuiqena/GenshinImpact", "Genshin Impact"),
216
- Model("Genshin", "yuiqena/GenshinImpact", ""),
217
- Model("Waifu", "hakurei/waifu-diffusion, flax/waifu-diffusion, technillogue/waifu-diffusion, Guizmus/AnimeChanStyle, katakana/2D-Mix", ""),
218
- Model("Pokémon", "lambdalabs/sd-pokemon-diffusers, svjack/Stable-Diffusion-Pokemon-en", "pokemon style"),
219
- Model("Pokémon", "lambdalabs/sd-pokemon-diffusers, svjack/Stable-Diffusion-Pokemon-en", ""),
220
- Model("Test", "AdamoOswald1/Idk", ""),
221
- Model("Anime", "Guizmus/AnimeChanStyle", "AnimeChan Style"),
222
- Model("Genshin", "Guizmus/AnimeChanStyle", "AnimeChan Style"),
223
- Model("Waifu", "Guizmus/AnimeChanStyle", "AnimeChan Style"),
224
- Model("Waifu", "Guizmus/AnimeChanStyle", "Genshin"),
225
- Model("Waifu", "Guizmus/AnimeChanStyle", "Genshin Impact"),
226
- Model("Genshin", "Guizmus/AnimeChanStyle", ""),
227
- Model("Anime", "Guizmus/AnimeChanStyle", ""),
228
- Model("Waifu", "Guizmus/AnimeChanStyle", ""),
229
- Model("Anime", "Guizmus/AnimeChanStyle, katakana/2D-Mix", ""),
230
- Model("Anime", "katakana/2D-Mix", "2D-Mix"),
231
- Model("Genshin", "katakana/2D-Mix", "2D-Mix"),
232
- Model("Waifu", "katakana/2D-Mix", "2D-Mix"),
233
- Model("Waifu", "katakana/2D-Mix", "Genshin"),
234
- Model("Waifu", "katakana/2D-Mix", "Genshin Impact"),
235
- Model("Genshin", "katakana/2D-Mix", ""),
236
- Model("Anime", "katakana/2D-Mix", ""),
237
- Model("Waifu", "katakana/2D-Mix", ""),
238
  Model("Beeple", "riccardogiorato/beeple-diffusion", "beeple style "),
239
  Model("Avatar", "riccardogiorato/avatar-diffusion", "avatartwow style "),
240
  Model("Poolsuite", "prompthero/poolsuite", "poolsuite style ")
@@ -266,6 +286,17 @@ current_model_path = current_model.path
266
 
267
  if is_colab:
268
  pipe = StableDiffusionPipeline.from_pretrained(current_model.path, torch_dtype=torch.float16, scheduler=scheduler)
 
 
 
 
 
 
 
 
 
 
 
269
 
270
  else: # download all models
271
  vae = AutoencoderKL.from_pretrained(current_model.path, subfolder="vae", torch_dtype=torch.float16)
@@ -331,8 +362,7 @@ def txt_to_img(model_path, prompt, neg_prompt, guidance, steps, width, height, g
331
  width = width,
332
  height = height,
333
  generator = generator)
334
-
335
- return replace_nsfw_images(result)
336
 
337
  def img_to_img(model_path, prompt, neg_prompt, img, strength, guidance, steps, width, height, generator=None):
338
 
@@ -367,14 +397,6 @@ def img_to_img(model_path, prompt, neg_prompt, img, strength, guidance, steps, w
367
  height = height,
368
  generator = generator)
369
 
370
- return replace_nsfw_images(result)
371
-
372
- def replace_nsfw_images(results):
373
- for i in range(len(results.images)):
374
- if results.nsfw_content_detected[i]:
375
- results.images[i] = Image.open("nsfw.png")
376
- return results.images[0]
377
-
378
  css = """.finetuned-diffusion-div div{display:inline-flex;align-items:center;gap:.8rem;font-size:1.75rem}.finetuned-diffusion-div div h1{font-weight:900;margin-bottom:7px}.finetuned-diffusion-div p{margin-bottom:10px;font-size:94%}a{text-decoration:underline}.tabs{margin-top:0;margin-bottom:0}#gallery{min-height:20rem}
379
  """
380
  with gr.Blocks(css=css) as demo:
@@ -445,15 +467,6 @@ with gr.Blocks(css=css) as demo:
445
  prompt.submit(inference, inputs=inputs, outputs=image_out)
446
  generate.click(inference, inputs=inputs, outputs=image_out)
447
 
448
- ex = gr.Examples([
449
- [models[1].name, "Neon techno-magic robot with spear pierces an ancient beast, hyperrealism, no blur, 4k resolution, ultra detailed", 7.5, 50],
450
- [models[1].name, "halfturn portrait of a big crystal face of a beautiful abstract ancient Egyptian elderly shaman woman, made of iridescent golden crystals, half - turn, bottom view, ominous, intricate, studio, art by anthony macbain and greg rutkowski and alphonse mucha, concept art, 4k, sharp focus", 7.5, 25],
451
- ], [model_name, prompt, guidance, steps, seed], image_out, inference, cache_examples=False)
452
-
453
- gr.HTML("""
454
- <p>Models by <a href="https://huggingface.co/riccardogiorato">@riccardogiorato</a><br></p>
455
- """)
456
-
457
  if not is_colab:
458
  demo.queue(concurrency_count=1)
459
  demo.launch(debug=is_colab, share=is_colab)
 
76
 
77
  is_colab = utils.is_google_colab()
78
 
79
+ from share_btn import community_icon_html, loading_icon_html, share_js
80
+
81
+ from huggingface_hub import login
82
+ login()
83
+
84
+ from huggingface_hub.inference_api import InferenceApi
85
+ inference = InferenceApi(repo_id="bert-base-uncased", token=API_TOKEN)
86
+
87
+ dataset = load_dataset("Guizmus/AnimeChanStyle")
88
+
89
+ sys.path.append('src/blip')
90
+ sys.path.append('src/clip')
91
+
92
+ pipeline = DiffusionPipeline.from_pretrained("flax/waifu-diffusion")
93
+ pipeline = DiffusionPipeline.from_pretrained("flax/Cyberpunk-Anime-Diffusion")
94
+ pipeline = DiffusionPipeline.from_pretrained("technillogue/waifu-diffusion")
95
+ pipeline = DiffusionPipeline.from_pretrained("svjack/Stable-Diffusion-Pokemon-en")
96
+ pipeline = DiffusionPipeline.from_pretrained("AdamOswald1/Idk")
97
+ pipeline = DiffusionPipeline.from_pretrained("katakana/2D-Mix")
98
+
99
  class Model:
100
  def __init__(self, name, path, prefix):
101
  self.name = name
 
110
  Model("Archer", "nitrosocke/archer-diffusion", "archer style"),
111
  Model("Elden Ring", "nitrosocke/elden-ring-diffusion", "elden ring style"),
112
  Model("Spider-Verse", "nitrosocke/spider-verse-diffusion", "spiderverse style"),
113
+ Model("Modern Disney", "nitrosocke/modern-disney-diffusion", "modern disney style"),
114
+ Model("Classic Disney", "nitrosocke/classic-anim-diffusion", "classic disney style"),
115
+ Model("Waifu", "hakurei/waifu-diffusion", ""),
116
+ Model("Pokémon", "lambdalabs/sd-pokemon-diffusers", "pokemon style"),
117
+ Model("Pokémon", "svjack/Stable-Diffusion-Pokemon-en", "pokemon style"),
118
+ Model("Pony Diffusion", "AstraliteHeart/pony-diffusion", "pony style"),
119
+ Model("Robo Diffusion", "nousr/robo-diffusion", "robo style"),
120
+ Model("Cyberpunk Anime", "DGSpitzer/Cyberpunk-Anime-Diffusion, flax/Cyberpunk-Anime-Diffusion", "cyberpunk style"),
121
+ Model("Cyberpunk Anime", "DGSpitzer/Cyberpunk-Anime-Diffusion", "cyberpunk style"),
122
+ Model("Cyberpunk Anime", "flax/Cyberpunk-Anime-Diffusion", "cyberpunk style"),
123
+ Model("Cyberware", "Eppinette/Cyberware", "cyberware"),
124
+ Model("Tron Legacy", "dallinmackay/Tron-Legacy-diffusion", "trnlgcy"),
125
+ Model("Waifu", "flax/waifu-diffusion", ""),
126
+ Model("Dark Souls", "Guizmus/DarkSoulsDiffusion", "dark souls style"),
127
+ Model("Waifu", "technillogue/waifu-diffusion", ""),
128
+ Model("Ouroborus", "Eppinette/Ouroboros", "m_ouroboros style"),
129
+ Model("Ouroborus alt", "Eppinette/Ouroboros", "m_ouroboros"),
130
+ Model("Waifu", "Eppinette/Mona", "Mona"),
131
+ Model("Waifu", "Eppinette/Mona", "Mona Woman"),
132
+ Model("Waifu", "Eppinette/Mona", "Mona Genshin"),
133
+ Model("Genshin", "Eppinette/Mona", "Mona"),
134
+ Model("Genshin", "Eppinette/Mona", "Mona Woman"),
135
+ Model("Genshin", "Eppinette/Mona", "Mona Genshin"),
136
+ Model("Space Machine", "rabidgremlin/sd-db-epic-space-machine", "EpicSpaceMachine"),
137
+ Model("Spacecraft", "rabidgremlin/sd-db-epic-space-machine", "EpicSpaceMachine"),
138
+ Model("TARDIS", "Guizmus/Tardisfusion", "Classic Tardis style"),
139
+ Model("TARDIS", "Guizmus/Tardisfusion", "Modern Tardis style"),
140
+ Model("TARDIS", "Guizmus/Tardisfusion", "Tardis Box style"),
141
+ Model("Spacecraft", "Guizmus/Tardisfusion", "Classic Tardis style"),
142
+ Model("Spacecraft", "Guizmus/Tardisfusion", "Modern Tardis style"),
143
+ Model("Spacecraft", "Guizmus/Tardisfusion", "Tardis Box style"),
144
+ Model("CLIP", "EleutherAI/clip-guided-diffusion", "CLIP"),
145
+ Model("Face Swap", "felixrosberg/face-swap", "faceswap"),
146
+ Model("Face Swap", "felixrosberg/face-swap", "faceswap with"),
147
+ Model("Face Swap", "felixrosberg/face-swap", "faceswapped"),
148
+ Model("Face Swap", "felixrosberg/face-swap", "faceswapped with"),
149
+ Model("Face Swap", "felixrosberg/face-swap", "face on"),
150
+ Model("Waifu", "Fampai/lumine_genshin_impact", "lumine_genshin"),
151
+ Model("Waifu", "Fampai/lumine_genshin_impact", "lumine"),
152
+ Model("Waifu", "Fampai/lumine_genshin_impact", "Lumine Genshin"),
153
+ Model("Waifu", "Fampai/lumine_genshin_impact", "Lumine_genshin"),
154
+ Model("Waifu", "Fampai/lumine_genshin_impact", "Lumine_Genshin"),
155
+ Model("Waifu", "Fampai/lumine_genshin_impact", "Lumine"),
156
+ Model("Genshin", "Fampai/lumine_genshin_impact", "Lumine_genshin"),
157
+ Model("Genshin", "Fampai/lumine_genshin_impact", "Lumine_Genshin"),
158
+ Model("Genshin", "Fampai/lumine_genshin_impact", "Lumine"),
159
+ Model("Genshin", "Fampai/lumine_genshin_impact", "Lumine Genshin"),
160
+ Model("Genshin", "Fampai/lumine_genshin_impact", "lumine"),
161
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Ganyu"),
162
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Ganyu Woman"),
163
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Ganyu Genshin"),
164
+ Model("Waifu", "sd-concepts-library/ganyu-genshin-impact", "Ganyu"),
165
+ Model("Waifu", "sd-concepts-library/ganyu-genshin-impact", "Ganyu Woman"),
166
+ Model("Waifu", "sd-concepts-library/ganyu-genshin-impact", "Ganyu Genshin"),
167
+ Model("Waifu", "Fampai/raiden_genshin_impact", "raiden_ei"),
168
+ Model("Waifu", "Fampai/raiden_genshin_impact", "Raiden Ei"),
169
+ Model("Waifu", "Fampai/raiden_genshin_impact", "Ei Genshin"),
170
+ Model("Waifu", "Fampai/raiden_genshin_impact", "Raiden Genshin"),
171
+ Model("Waifu", "Fampai/raiden_genshin_impact", "Raiden_Genshin"),
172
+ Model("Waifu", "Fampai/raiden_genshin_impact", "Ei_Genshin"),
173
+ Model("Waifu", "Fampai/raiden_genshin_impact", "Raiden"),
174
+ Model("Waifu", "Fampai/raiden_genshin_impact", "Ei"),
175
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Raiden Ei"),
176
+ Model("Genshin", "Fampai/raiden_genshin_impact", "raiden_ei"),
177
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Raiden"),
178
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Raiden Genshin"),
179
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Ei Genshin"),
180
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Raiden_Genshin"),
181
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Ei_Genshin"),
182
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Ei"),
183
+ Model("Waifu", "Fampai/hutao_genshin_impact", "hutao_genshin"),
184
+ Model("Waifu", "Fampai/hutao_genshin_impact", "HuTao_Genshin"),
185
+ Model("Waifu", "Fampai/hutao_genshin_impact", "HuTao Genshin"),
186
+ Model("Waifu", "Fampai/hutao_genshin_impact", "HuTao"),
187
+ Model("Waifu", "Fampai/hutao_genshin_impact", "hutao_genshin"),
188
+ Model("Genshin", "Fampai/hutao_genshin_impact", "hutao_genshin"),
189
+ Model("Genshin", "Fampai/hutao_genshin_impact", "HuTao_Genshin"),
190
+ Model("Genshin", "Fampai/hutao_genshin_impact", "HuTao Genshin"),
191
+ Model("Genshin", "Fampai/hutao_genshin_impact", "HuTao"),
192
+ Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Female"),
193
+ Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "female"),
194
+ Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Woman"),
195
+ Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "woman"),
196
+ Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Girl"),
197
+ Model("Genshin", "Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "girl"),
198
+ Model("Genshin", "Fampai/lumine_genshin_impact", "Female"),
199
+ Model("Genshin", "Fampai/lumine_genshin_impact", "female"),
200
+ Model("Genshin", "Fampai/lumine_genshin_impact", "Woman"),
201
+ Model("Genshin", "Fampai/lumine_genshin_impact", "woman"),
202
+ Model("Genshin", "Fampai/lumine_genshin_impact", "Girl"),
203
+ Model("Genshin", "Fampai/lumine_genshin_impact", "girl"),
204
+ Model("Genshin", "Eppinette/Mona", "Female"),
205
+ Model("Genshin", "Eppinette/Mona", "female"),
206
+ Model("Genshin", "Eppinette/Mona", "Woman"),
207
+ Model("Genshin", "Eppinette/Mona", "woman"),
208
+ Model("Genshin", "Eppinette/Mona", "Girl"),
209
+ Model("Genshin", "Eppinette/Mona", "girl"),
210
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Female"),
211
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "female"),
212
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Woman"),
213
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "woman"),
214
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "Girl"),
215
+ Model("Genshin", "sd-concepts-library/ganyu-genshin-impact", "girl"),
216
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Female"),
217
+ Model("Genshin", "Fampai/raiden_genshin_impact", "female"),
218
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Woman"),
219
+ Model("Genshin", "Fampai/raiden_genshin_impact", "woman"),
220
+ Model("Genshin", "Fampai/raiden_genshin_impact", "Girl"),
221
+ Model("Genshin", "Fampai/raiden_genshin_impact", "girl"),
222
+ Model("Genshin", "Fampai/hutao_genshin_impact", "Female"),
223
+ Model("Genshin", "Fampai/hutao_genshin_impact", "female"),
224
+ Model("Genshin", "Fampai/hutao_genshin_impact", "Woman"),
225
+ Model("Genshin", "Fampai/hutao_genshin_impact", "woman"),
226
+ Model("Genshin", "Fampai/hutao_genshin_impact", "Girl"),
227
+ Model("Genshin", "Fampai/hutao_genshin_impact", "girl"),
228
+ Model("Waifu", "crumb/genshin-stable-inversion, yuiqena/GenshinImpact, Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Genshin"),
229
+ Model("Waifu", "crumb/genshin-stable-inversion, yuiqena/GenshinImpact, Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", "Genshin Impact"),
230
+ Model("Genshin", "crumb/genshin-stable-inversion, yuiqena/GenshinImpact, Fampai/lumine_genshin_impact, Eppinette/Mona, sd-concepts-library/ganyu-genshin-impact, Fampai/raiden_genshin_impact, Fampai/hutao_genshin_impact", ""),
231
+ Model("Waifu", "crumb/genshin-stable-inversion", "Genshin"),
232
+ Model("Waifu", "crumb/genshin-stable-inversion", "Genshin Impact"),
233
+ Model("Genshin", "crumb/genshin-stable-inversion", ""),
234
+ Model("Waifu", "yuiqena/GenshinImpact", "Genshin"),
235
+ Model("Waifu", "yuiqena/GenshinImpact", "Genshin Impact"),
236
+ Model("Genshin", "yuiqena/GenshinImpact", ""),
237
+ Model("Waifu", "hakurei/waifu-diffusion, flax/waifu-diffusion, technillogue/waifu-diffusion, Guizmus/AnimeChanStyle, katakana/2D-Mix", ""),
238
+ Model("Pokémon", "lambdalabs/sd-pokemon-diffusers, svjack/Stable-Diffusion-Pokemon-en", "pokemon style"),
239
+ Model("Pokémon", "lambdalabs/sd-pokemon-diffusers, svjack/Stable-Diffusion-Pokemon-en", ""),
240
+ Model("Test", "AdamoOswald1/Idk", ""),
241
+ Model("Anime", "Guizmus/AnimeChanStyle", "AnimeChan Style"),
242
+ Model("Genshin", "Guizmus/AnimeChanStyle", "AnimeChan Style"),
243
+ Model("Waifu", "Guizmus/AnimeChanStyle", "AnimeChan Style"),
244
+ Model("Waifu", "Guizmus/AnimeChanStyle", "Genshin"),
245
+ Model("Waifu", "Guizmus/AnimeChanStyle", "Genshin Impact"),
246
+ Model("Genshin", "Guizmus/AnimeChanStyle", ""),
247
+ Model("Anime", "Guizmus/AnimeChanStyle", ""),
248
+ Model("Waifu", "Guizmus/AnimeChanStyle", ""),
249
+ Model("Anime", "Guizmus/AnimeChanStyle, katakana/2D-Mix", ""),
250
+ Model("Anime", "katakana/2D-Mix", "2D-Mix"),
251
+ Model("Genshin", "katakana/2D-Mix", "2D-Mix"),
252
+ Model("Waifu", "katakana/2D-Mix", "2D-Mix"),
253
+ Model("Waifu", "katakana/2D-Mix", "Genshin"),
254
+ Model("Waifu", "katakana/2D-Mix", "Genshin Impact"),
255
+ Model("Genshin", "katakana/2D-Mix", ""),
256
+ Model("Anime", "katakana/2D-Mix", ""),
257
+ Model("Waifu", "katakana/2D-Mix", ""),
258
  Model("Beeple", "riccardogiorato/beeple-diffusion", "beeple style "),
259
  Model("Avatar", "riccardogiorato/avatar-diffusion", "avatartwow style "),
260
  Model("Poolsuite", "prompthero/poolsuite", "poolsuite style ")
 
286
 
287
  if is_colab:
288
  pipe = StableDiffusionPipeline.from_pretrained(current_model.path, torch_dtype=torch.float16, scheduler=scheduler)
289
+ pipe = StableDiffusionPipeline.from_pretrained("hakurei/waifu-diffusion", torch_type=torch.float16, revision="fp16")
290
+ pipe = StableDiffusionPipeline.from_pretrained(current_model, torch_dtype=torchfloat, revision="fp16")
291
+ gpt2_pipe = pipeline('text-generation', model='Gustavosta/MagicPrompt-Stable-Diffusion', tokenizer='gpt2')
292
+ pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", use_auth_token=True, revision="fp16", torch_dtype=torch.float16).to("cuda")
293
+ pipe = StableDiffusionPipeline.from_pretrained(current_model.path, torch_dtype=torch.float16)
294
+ pipeline = DiffusionPipeline.from_pretrained("flax/waifu-diffusion")
295
+ pipeline = DiffusionPipeline.from_pretrained("flax/Cyberpunk-Anime-Diffusion")
296
+ pipeline = DiffusionPipeline.from_pretrained("technillogue/waifu-diffusion")
297
+ pipeline = DiffusionPipeline.from_pretrained("svjack/Stable-Diffusion-Pokemon-en")
298
+ pipeline = DiffusionPipeline.from_pretrained("AdamOswald1/Idk")
299
+ pipeline = DiffusionPipeline.from_pretrained("katakana/2D-Mix")
300
 
301
  else: # download all models
302
  vae = AutoencoderKL.from_pretrained(current_model.path, subfolder="vae", torch_dtype=torch.float16)
 
362
  width = width,
363
  height = height,
364
  generator = generator)
365
+
 
366
 
367
  def img_to_img(model_path, prompt, neg_prompt, img, strength, guidance, steps, width, height, generator=None):
368
 
 
397
  height = height,
398
  generator = generator)
399
 
 
 
 
 
 
 
 
 
400
  css = """.finetuned-diffusion-div div{display:inline-flex;align-items:center;gap:.8rem;font-size:1.75rem}.finetuned-diffusion-div div h1{font-weight:900;margin-bottom:7px}.finetuned-diffusion-div p{margin-bottom:10px;font-size:94%}a{text-decoration:underline}.tabs{margin-top:0;margin-bottom:0}#gallery{min-height:20rem}
401
  """
402
  with gr.Blocks(css=css) as demo:
 
467
  prompt.submit(inference, inputs=inputs, outputs=image_out)
468
  generate.click(inference, inputs=inputs, outputs=image_out)
469
 
 
 
 
 
 
 
 
 
 
470
  if not is_colab:
471
  demo.queue(concurrency_count=1)
472
  demo.launch(debug=is_colab, share=is_colab)