Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -23,8 +23,8 @@ def genie (Model, Prompt, negative_prompt, height, width, scale, steps, seed):
|
|
23 |
torch.cuda.empty_cache()
|
24 |
return image
|
25 |
|
26 |
-
if Model == "Animagine XL
|
27 |
-
animagine = DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-
|
28 |
animagine.enable_xformers_memory_efficient_attention()
|
29 |
animagine = animagine.to(device)
|
30 |
torch.cuda.empty_cache()
|
|
|
23 |
torch.cuda.empty_cache()
|
24 |
return image
|
25 |
|
26 |
+
if Model == "Animagine XL 4":
|
27 |
+
animagine = DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-4.0", torch_dtype=torch.float16, safety_checker=None) if torch.cuda.is_available() else DiffusionPipeline.from_pretrained("cagliostrolab/animagine-xl-4.0")
|
28 |
animagine.enable_xformers_memory_efficient_attention()
|
29 |
animagine = animagine.to(device)
|
30 |
torch.cuda.empty_cache()
|