Update model_loading.py

This commit is contained in:
kijai 2024-11-07 23:02:52 +02:00
parent f52c45800c
commit 9cce8015d3

View File

@ -190,6 +190,8 @@ class DownloadAndLoadCogVideoModel:
# compilation
if compile == "torch":
torch._dynamo.config.suppress_errors = True
torch._dynamo.config.cache_size_limit = 64
pipe.transformer.to(memory_format=torch.channels_last)
#pipe.transformer = torch.compile(pipe.transformer, mode="default", fullgraph=False, backend="inductor")
for i, block in enumerate(pipe.transformer.transformer_blocks):