ComfyUI Node
TorchCompileModel_LoRASafe
A ComfyUI node in model/optimisation 🛠️ with 11 inputs and 1 output.
TorchCompileModel_LoRASafe
- model
- MODEL
◄backend▾►
◄mode▾►
◄fullgraphfalse►
◄dynamicfalse►
◄disable_cudagraphstrue►
◄compile_transformer_onlyfalse►
◄debug_torch_logsfalse►
◄skip_dynamic_cudagraphstrue►
◄allow_flux_inferred_targetsfalse►
◄fallback_to_full_model_if_no_targetsfalse►
Categorymodel/optimisation 🛠️
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| backend | COMBO | 3 options: inductor, cudagraphs, nvfuser | |
| mode | COMBO | 3 options: default, reduce-overhead, max-autotune | |
| fullgraph | BOOLEAN | false | — |
| dynamic | BOOLEAN | false | — |
| disable_cudagraphs | BOOLEAN | true | True -> pass torch.compile options {'triton.cudagraphs': False} for inductor backend. Useful to avoid cudaMallocAsync/cudagraph issues in some environments. |
| compile_transformer_only | BOOLEAN | false | True -> compile discovered transformer targets only. Flux models compile leaf submodules inside double_blocks/single_blocks; SD-style models often compile transformer_blocks/blocks. |
| debug_torch_logs | BOOLEAN | false | Enable PyTorch compile/cudagraph debug logs via torch._logging.set_logs (ignored if TORCH_LOGS env var is already set). |
| skip_dynamic_cudagraphs | BOOLEAN | true | For cudagraph-capable runs, skip cudagraphing functions with dynamic-shape inputs. Recommended for Flux. |
| allow_flux_inferred_targets | BOOLEAN | false | False (recommended) -> Flux compile targets are strict and limited to qkv/proj/linear1/linear2 leaves only. True -> also allow inferred Flux target names for compatibility. |
| fallback_to_full_model_if_no_targets | BOOLEAN | false | If transformer-only target discovery finds nothing, fall back to compiling diffusion_model. False keeps execution uncompiled instead of widening target scope. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |