Spaces:
Paused
Paused
Commit
•
e508ff5
1
Parent(s):
10d7517
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ if not torch.cuda.is_available():
|
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
22 |
CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
|
23 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1536"))
|
24 |
-
USE_TORCH_COMPILE =
|
25 |
ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
|
26 |
PREVIEW_IMAGES = False #not working for now
|
27 |
|
@@ -41,12 +41,7 @@ if torch.cuda.is_available():
|
|
41 |
if USE_TORCH_COMPILE:
|
42 |
prior_pipeline.prior = torch.compile(prior_pipeline.prior, mode="max-autotune", fullgraph=True)
|
43 |
decoder_pipeline.decoder = torch.compile(decoder_pipeline.decoder, mode="max-autotune", fullgraph=True)
|
44 |
-
|
45 |
-
torch._inductor.config.coordinate_descent_tuning = True
|
46 |
-
torch._inductor.config.epilogue_fusion = False
|
47 |
-
torch._inductor.config.coordinate_descent_check_all_directions = True
|
48 |
-
prior_pipeline.prior.to(memory_format=torch.channels_last)
|
49 |
-
decoder_pipeline.decoder.to(memory_format=torch.channels_last)
|
50 |
if PREVIEW_IMAGES:
|
51 |
pass
|
52 |
# previewer = Previewer()
|
@@ -198,7 +193,7 @@ with gr.Blocks() as demo:
|
|
198 |
minimum=1,
|
199 |
maximum=2,
|
200 |
step=1,
|
201 |
-
value=
|
202 |
)
|
203 |
with gr.Row():
|
204 |
prior_guidance_scale = gr.Slider(
|
|
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
22 |
CACHE_EXAMPLES = torch.cuda.is_available() and os.getenv("CACHE_EXAMPLES") == "1"
|
23 |
MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "1536"))
|
24 |
+
USE_TORCH_COMPILE = False
|
25 |
ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
|
26 |
PREVIEW_IMAGES = False #not working for now
|
27 |
|
|
|
41 |
if USE_TORCH_COMPILE:
|
42 |
prior_pipeline.prior = torch.compile(prior_pipeline.prior, mode="max-autotune", fullgraph=True)
|
43 |
decoder_pipeline.decoder = torch.compile(decoder_pipeline.decoder, mode="max-autotune", fullgraph=True)
|
44 |
+
|
|
|
|
|
|
|
|
|
|
|
45 |
if PREVIEW_IMAGES:
|
46 |
pass
|
47 |
# previewer = Previewer()
|
|
|
193 |
minimum=1,
|
194 |
maximum=2,
|
195 |
step=1,
|
196 |
+
value=1,
|
197 |
)
|
198 |
with gr.Row():
|
199 |
prior_guidance_scale = gr.Slider(
|