diff --git a/README.md b/README.md index 18ad3fd..ead539c 100644 --- a/README.md +++ b/README.md @@ -79,9 +79,12 @@ One of the advantages of this node over the original `TorchCompileModel` node is It is suggested to pass `--gpu-only` when launching your `ComfyUI` if you are using this node, for example, if you are using `comfy-cli`: ```bash -comfy launch -- --gpu-only --force-channels-last +comfy launch -- --gpu-only ``` +If you encounter any problems with frequent compilation after changing the resolution or text prompt, you could try enabling the `dynamic` option of the `Compile Model+` node. +Or you could launch your `ComfyUI` with environment variable `TORCH_LOGS=recompiles_verbose` to debug the reason for recompilation. + **NOTE**: `torch.compile` might not be able to work with model offloading well, you could try passing `--gpu-only` when launching your `ComfyUI` to disable model offloading. **NOTE**: `torch.compile` does not work on Windows offcially, you should not use this node if you are facing this problem, or search on Google to find out how to make it work. diff --git a/misc_nodes.py b/misc_nodes.py index 75e4ce1..1a20985 100644 --- a/misc_nodes.py +++ b/misc_nodes.py @@ -118,6 +118,13 @@ def patch( mode = mode if mode else None options = json.loads(options) if options else None + if compiler == "torch.compile" and backend == "inductor" and dynamic: + # TODO: Fix this + # File "pytorch/torch/_inductor/fx_passes/post_grad.py", line 643, in same_meta + # and statically_known_true(sym_eq(val1.size(), val2.size())) + # AttributeError: 'SymInt' object has no attribute 'size' + pass + if is_patcher: patcher = model.clone() else: diff --git a/pyproject.toml b/pyproject.toml index d9d9db2..eb921ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "wavespeed" description = "The all in one inference optimization solution for ComfyUI, universal, flexible, and fast." -version = "1.0.23" +version = "1.0.24" license = {file = "LICENSE"} [project.urls]