Spaces:
Paused
Paused
Commit
•
099c99b
1
Parent(s):
e765369
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import random
|
4 |
-
from diffusers import
|
5 |
import torch
|
6 |
|
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 |
-
pipe =
|
|
|
12 |
pipe.enable_xformers_memory_efficient_attention()
|
13 |
pipe = pipe.to(device)
|
14 |
else:
|
@@ -103,7 +104,7 @@ with gr.Blocks(css=css) as demo:
|
|
103 |
minimum=256,
|
104 |
maximum=MAX_IMAGE_SIZE,
|
105 |
step=32,
|
106 |
-
value=
|
107 |
)
|
108 |
|
109 |
height = gr.Slider(
|
@@ -111,7 +112,7 @@ with gr.Blocks(css=css) as demo:
|
|
111 |
minimum=256,
|
112 |
maximum=MAX_IMAGE_SIZE,
|
113 |
step=32,
|
114 |
-
value=
|
115 |
)
|
116 |
|
117 |
with gr.Row():
|
@@ -121,15 +122,15 @@ with gr.Blocks(css=css) as demo:
|
|
121 |
minimum=0.0,
|
122 |
maximum=10.0,
|
123 |
step=0.1,
|
124 |
-
value=
|
125 |
)
|
126 |
|
127 |
num_inference_steps = gr.Slider(
|
128 |
label="Number of inference steps",
|
129 |
minimum=1,
|
130 |
-
maximum=
|
131 |
step=1,
|
132 |
-
value=
|
133 |
)
|
134 |
|
135 |
gr.Examples(
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
import random
|
4 |
+
from diffusers import AuraFlowPipeline
|
5 |
import torch
|
6 |
|
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 |
+
pipe = AuraFlowPipeline.from_pretrained("AuraDiffusion/auradiffusion-v0.1a0",
|
12 |
+
torch_dtype=torch.float16)
|
13 |
pipe.enable_xformers_memory_efficient_attention()
|
14 |
pipe = pipe.to(device)
|
15 |
else:
|
|
|
104 |
minimum=256,
|
105 |
maximum=MAX_IMAGE_SIZE,
|
106 |
step=32,
|
107 |
+
value=1024,
|
108 |
)
|
109 |
|
110 |
height = gr.Slider(
|
|
|
112 |
minimum=256,
|
113 |
maximum=MAX_IMAGE_SIZE,
|
114 |
step=32,
|
115 |
+
value=1024,
|
116 |
)
|
117 |
|
118 |
with gr.Row():
|
|
|
122 |
minimum=0.0,
|
123 |
maximum=10.0,
|
124 |
step=0.1,
|
125 |
+
value=5.0,
|
126 |
)
|
127 |
|
128 |
num_inference_steps = gr.Slider(
|
129 |
label="Number of inference steps",
|
130 |
minimum=1,
|
131 |
+
maximum=50,
|
132 |
step=1,
|
133 |
+
value=50,
|
134 |
)
|
135 |
|
136 |
gr.Examples(
|