Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,9 +39,16 @@ if torch.cuda.is_available():
|
|
| 39 |
decoder_pipeline.to(device)
|
| 40 |
|
| 41 |
if USE_TORCH_COMPILE:
|
| 42 |
-
prior_pipeline.prior = torch.compile(prior_pipeline.prior, mode="
|
| 43 |
-
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
if PREVIEW_IMAGES:
|
| 46 |
pass
|
| 47 |
# previewer = Previewer()
|
|
|
|
| 39 |
decoder_pipeline.to(device)
|
| 40 |
|
| 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 |
+
prior_pipeline.fuse_qkv_projections()
|
| 45 |
+
decoder_pipeline.fuse_qkv_projections()
|
| 46 |
+
torch._inductor.config.conv_1x1_as_mm = True
|
| 47 |
+
torch._inductor.config.coordinate_descent_tuning = True
|
| 48 |
+
torch._inductor.config.epilogue_fusion = False
|
| 49 |
+
torch._inductor.config.coordinate_descent_check_all_directions = True
|
| 50 |
+
prior_pipeline.prior.to(memory_format=torch.channels_last)
|
| 51 |
+
decoder_pipeline.decoder.to(memory_format=torch.channels_last)
|
| 52 |
if PREVIEW_IMAGES:
|
| 53 |
pass
|
| 54 |
# previewer = Previewer()
|