Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,12 +26,12 @@ os.environ["TRANSFORMERS_CACHE"] = cache_path
|
|
| 26 |
os.environ["HF_HUB_CACHE"] = cache_path
|
| 27 |
os.environ["HF_HOME"] = cache_path
|
| 28 |
|
| 29 |
-
torch.set_float32_matmul_precision("
|
| 30 |
|
| 31 |
-
torch._inductor.config.conv_1x1_as_mm = True
|
| 32 |
-
torch._inductor.config.coordinate_descent_tuning = True
|
| 33 |
-
torch._inductor.config.epilogue_fusion = False
|
| 34 |
-
torch._inductor.config.coordinate_descent_check_all_directions = False
|
| 35 |
|
| 36 |
# Load LoRAs from JSON file
|
| 37 |
with open('loras.json', 'r') as f:
|
|
@@ -71,10 +71,10 @@ pipe.text_encoder.dtype = torch.bfloat16
|
|
| 71 |
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to("cuda")
|
| 72 |
|
| 73 |
|
| 74 |
-
pipe.transformer.to(memory_format=torch.channels_last)
|
| 75 |
#pipe.vae.to(memory_format=torch.channels_last)
|
| 76 |
|
| 77 |
-
pipe.transformer = torch.compile(pipe.transformer, mode="max-autotune", fullgraph=False)
|
| 78 |
#pipe.vae.decode = torch.compile(pipe.vae.decode, mode="max-autotune", fullgraph=False)
|
| 79 |
|
| 80 |
MAX_SEED = 2**32-1
|
|
|
|
| 26 |
os.environ["HF_HUB_CACHE"] = cache_path
|
| 27 |
os.environ["HF_HOME"] = cache_path
|
| 28 |
|
| 29 |
+
torch.set_float32_matmul_precision("medium")
|
| 30 |
|
| 31 |
+
#torch._inductor.config.conv_1x1_as_mm = True
|
| 32 |
+
#torch._inductor.config.coordinate_descent_tuning = True
|
| 33 |
+
#torch._inductor.config.epilogue_fusion = False
|
| 34 |
+
#torch._inductor.config.coordinate_descent_check_all_directions = False
|
| 35 |
|
| 36 |
# Load LoRAs from JSON file
|
| 37 |
with open('loras.json', 'r') as f:
|
|
|
|
| 71 |
pipe.vae = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to("cuda")
|
| 72 |
|
| 73 |
|
| 74 |
+
#pipe.transformer.to(memory_format=torch.channels_last)
|
| 75 |
#pipe.vae.to(memory_format=torch.channels_last)
|
| 76 |
|
| 77 |
+
#pipe.transformer = torch.compile(pipe.transformer, mode="max-autotune", fullgraph=False)
|
| 78 |
#pipe.vae.decode = torch.compile(pipe.vae.decode, mode="max-autotune", fullgraph=False)
|
| 79 |
|
| 80 |
MAX_SEED = 2**32-1
|