Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,7 @@ from diffusers import DiffusionPipeline
|
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
|
9 |
if torch.cuda.is_available():
|
|
|
10 |
torch.cuda.max_memory_allocated(device=device)
|
11 |
torch.cuda.empty_cache()
|
12 |
pipe = DiffusionPipeline.from_pretrained("hf-models/sdxl-turbo", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
@@ -14,6 +15,7 @@ if torch.cuda.is_available():
|
|
14 |
pipe = pipe.to(device)
|
15 |
torch.cuda.empty_cache()
|
16 |
else:
|
|
|
17 |
pipe = DiffusionPipeline.from_pretrained("hf-models/sdxl-turbo", use_safetensors=True)
|
18 |
pipe = pipe.to(device)
|
19 |
|
@@ -27,6 +29,6 @@ gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generat
|
|
27 |
gr.Slider(minimum=0, step=1, maximum=999999999999999999, randomize=True),
|
28 |
],
|
29 |
outputs='image',
|
30 |
-
title="Stable Diffusion Turbo
|
31 |
-
description="SDXL Turbo
|
32 |
-
article = "
|
|
|
7 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
8 |
|
9 |
if torch.cuda.is_available():
|
10 |
+
print("cuda")
|
11 |
torch.cuda.max_memory_allocated(device=device)
|
12 |
torch.cuda.empty_cache()
|
13 |
pipe = DiffusionPipeline.from_pretrained("hf-models/sdxl-turbo", torch_dtype=torch.float16, variant="fp16", use_safetensors=True)
|
|
|
15 |
pipe = pipe.to(device)
|
16 |
torch.cuda.empty_cache()
|
17 |
else:
|
18 |
+
print("cpu")
|
19 |
pipe = DiffusionPipeline.from_pretrained("hf-models/sdxl-turbo", use_safetensors=True)
|
20 |
pipe = pipe.to(device)
|
21 |
|
|
|
29 |
gr.Slider(minimum=0, step=1, maximum=999999999999999999, randomize=True),
|
30 |
],
|
31 |
outputs='image',
|
32 |
+
title="Stable Diffusion Turbo",
|
33 |
+
description="SDXL Turbo. <br><br><b>WARNING: This model is capable of producing NSFW (Softcore) images.</b>",
|
34 |
+
article = "Hosted on gitee-ai").launch(debug=True, max_threads=80)
|