AdamOswald1
commited on
Commit
•
8a19abc
1
Parent(s):
7ad2d01
Update app.py
Browse files
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 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
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)
|