Expose force_parameter_static_shapes in torch.compile options
This commit is contained in:
+6
-5
@@ -112,12 +112,13 @@ class WanVideoUni3C_ControlnetLoader:
|
||||
del sd
|
||||
|
||||
if compile_args is not None:
|
||||
torch._dynamo.config.cache_size_limit = compile_args["dynamo_cache_size_limit"]
|
||||
try:
|
||||
if hasattr(torch, '_dynamo') and hasattr(torch._dynamo, 'config'):
|
||||
if hasattr(torch, '_dynamo') and hasattr(torch._dynamo, 'config'):
|
||||
torch._dynamo.config.cache_size_limit = compile_args["dynamo_cache_size_limit"]
|
||||
torch._dynamo.config.force_parameter_static_shapes = compile_args["force_parameter_static_shapes"]
|
||||
try:
|
||||
torch._dynamo.config.recompile_limit = compile_args["dynamo_recompile_limit"]
|
||||
except Exception as e:
|
||||
log.warning(f"Could not set recompile_limit: {e}")
|
||||
except Exception as e:
|
||||
log.warning(f"Could not set recompile_limit: {e}")
|
||||
if compile_args["compile_transformer_blocks_only"]:
|
||||
for i, block in enumerate(controlnet.controlnet_blocks):
|
||||
controlnet.controlnet_blocks[i] = torch.compile(block, fullgraph=compile_args["fullgraph"], dynamic=compile_args["dynamic"], backend=compile_args["backend"], mode=compile_args["mode"])
|
||||
|
||||
Reference in New Issue
Block a user