Spaces:
Runtime error
Runtime error
testing
Browse files
app.py
CHANGED
@@ -20,22 +20,22 @@ models = [
|
|
20 |
Model("Custom model", "", ""),
|
21 |
Model("Arcane", "nitrosocke/Arcane-Diffusion", "arcane style "),
|
22 |
Model("Archer", "nitrosocke/archer-diffusion", "archer style "),
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
]
|
34 |
|
35 |
last_mode = "txt2img"
|
36 |
current_model = models[1]
|
37 |
current_model_path = current_model.path
|
38 |
-
pipe = None
|
39 |
|
40 |
if is_colab:
|
41 |
pipe = StableDiffusionPipeline.from_pretrained(current_model.path, torch_dtype=torch.float16)
|
@@ -116,7 +116,7 @@ def img_to_img(model_path, prompt, neg_prompt, img, strength, guidance, steps, w
|
|
116 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16)
|
117 |
else:
|
118 |
pipe = pipe.to("cpu")
|
119 |
-
pipe = current_model.
|
120 |
|
121 |
if torch.cuda.is_available():
|
122 |
pipe = pipe.to("cuda")
|
@@ -246,7 +246,7 @@ with gr.Blocks(css=css) as demo:
|
|
246 |
[models[5].name, "portrait of a beautiful alyx vance half life", 10, 50],
|
247 |
[models[6].name, "Aloy from Horizon: Zero Dawn, half body portrait, smooth, detailed armor, beautiful face, illustration", 7.0, 45],
|
248 |
[models[5].name, "fantasy portrait painting, digital art", 4.0, 30],
|
249 |
-
], [model_name, prompt, guidance, steps, seed], image_out, inference, cache_examples=not is_colab and torch.cuda.is_available())
|
250 |
# ex.dataset.headers = [""]
|
251 |
|
252 |
gr.Markdown('''
|
|
|
20 |
Model("Custom model", "", ""),
|
21 |
Model("Arcane", "nitrosocke/Arcane-Diffusion", "arcane style "),
|
22 |
Model("Archer", "nitrosocke/archer-diffusion", "archer style "),
|
23 |
+
# Model("Elden Ring", "nitrosocke/elden-ring-diffusion", "elden ring style "),
|
24 |
+
# Model("Spider-Verse", "nitrosocke/spider-verse-diffusion", "spiderverse style "),
|
25 |
+
# Model("Modern Disney", "nitrosocke/modern-disney-diffusion", "modern disney style "),
|
26 |
+
# Model("Classic Disney", "nitrosocke/classic-anim-diffusion", ""),
|
27 |
+
# Model("Waifu", "hakurei/waifu-diffusion", ""),
|
28 |
+
# Model("Pokémon", "lambdalabs/sd-pokemon-diffusers", ""),
|
29 |
+
# Model("Pony Diffusion", "AstraliteHeart/pony-diffusion", ""),
|
30 |
+
# Model("Robo Diffusion", "nousr/robo-diffusion", ""),
|
31 |
+
# Model("Cyberpunk Anime", "DGSpitzer/Cyberpunk-Anime-Diffusion", "dgs illustration style "),
|
32 |
+
# Model("Tron Legacy", "dallinmackay/Tron-Legacy-diffusion", "trnlgcy")
|
33 |
]
|
34 |
|
35 |
last_mode = "txt2img"
|
36 |
current_model = models[1]
|
37 |
current_model_path = current_model.path
|
38 |
+
# pipe = None
|
39 |
|
40 |
if is_colab:
|
41 |
pipe = StableDiffusionPipeline.from_pretrained(current_model.path, torch_dtype=torch.float16)
|
|
|
116 |
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(current_model_path, torch_dtype=torch.float16)
|
117 |
else:
|
118 |
pipe = pipe.to("cpu")
|
119 |
+
pipe = current_model.pipe_i2i
|
120 |
|
121 |
if torch.cuda.is_available():
|
122 |
pipe = pipe.to("cuda")
|
|
|
246 |
[models[5].name, "portrait of a beautiful alyx vance half life", 10, 50],
|
247 |
[models[6].name, "Aloy from Horizon: Zero Dawn, half body portrait, smooth, detailed armor, beautiful face, illustration", 7.0, 45],
|
248 |
[models[5].name, "fantasy portrait painting, digital art", 4.0, 30],
|
249 |
+
], [model_name, prompt, guidance, steps, seed], image_out, inference, cache_examples=False)# not is_colab and torch.cuda.is_available())
|
250 |
# ex.dataset.headers = [""]
|
251 |
|
252 |
gr.Markdown('''
|