Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -116,10 +116,8 @@ def load_and_prepare_model(model_id):
|
|
116 |
add_watermarker=False,
|
117 |
use_safetensors=True,
|
118 |
vae=vae,
|
119 |
-
)
|
120 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
121 |
-
pipe.to(torch.bfloat16)
|
122 |
-
pipe.to('cuda')
|
123 |
if ENABLE_CPU_OFFLOAD:
|
124 |
pipe.enable_model_cpu_offload()
|
125 |
return pipe
|
@@ -175,7 +173,7 @@ def generate(
|
|
175 |
seed: int = 1,
|
176 |
width: int = 768,
|
177 |
height: int = 768,
|
178 |
-
guidance_scale: float =
|
179 |
num_inference_steps: int = 250,
|
180 |
randomize_seed: bool = False,
|
181 |
use_resolution_binning: bool = True,
|
@@ -226,7 +224,7 @@ def generate_cpu(
|
|
226 |
seed: int = 1,
|
227 |
width: int = 768,
|
228 |
height: int = 768,
|
229 |
-
guidance_scale: float =
|
230 |
num_inference_steps: int = 250,
|
231 |
randomize_seed: bool = False,
|
232 |
use_resolution_binning: bool = True,
|
@@ -382,7 +380,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
382 |
minimum=0.1,
|
383 |
maximum=6,
|
384 |
step=0.1,
|
385 |
-
value=
|
386 |
)
|
387 |
num_inference_steps = gr.Slider(
|
388 |
label="Number of inference steps",
|
|
|
116 |
add_watermarker=False,
|
117 |
use_safetensors=True,
|
118 |
vae=vae,
|
119 |
+
).to('cuda')
|
120 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
|
|
|
|
121 |
if ENABLE_CPU_OFFLOAD:
|
122 |
pipe.enable_model_cpu_offload()
|
123 |
return pipe
|
|
|
173 |
seed: int = 1,
|
174 |
width: int = 768,
|
175 |
height: int = 768,
|
176 |
+
guidance_scale: float = 3.0,
|
177 |
num_inference_steps: int = 250,
|
178 |
randomize_seed: bool = False,
|
179 |
use_resolution_binning: bool = True,
|
|
|
224 |
seed: int = 1,
|
225 |
width: int = 768,
|
226 |
height: int = 768,
|
227 |
+
guidance_scale: float = 3,
|
228 |
num_inference_steps: int = 250,
|
229 |
randomize_seed: bool = False,
|
230 |
use_resolution_binning: bool = True,
|
|
|
380 |
minimum=0.1,
|
381 |
maximum=6,
|
382 |
step=0.1,
|
383 |
+
value=3.0,
|
384 |
)
|
385 |
num_inference_steps = gr.Slider(
|
386 |
label="Number of inference steps",
|