Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-INT8-Toolkit > INT8 Lazy Torch Compile

ComfyUI Node: INT8 Lazy Torch Compile

Class Name

INT8LazyTorchCompile

Category
loaders
Author
SparknightLLC (Account age: 683days)
Extension
ComfyUI-INT8-Toolkit
Latest Updated
2026-06-23
Github Stars
0.03K

How to Install ComfyUI-INT8-Toolkit

Install this extension via the ComfyUI Manager by searching for ComfyUI-INT8-Toolkit
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-INT8-Toolkit in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

INT8 Lazy Torch Compile Description

Optimize AI model performance with lazy compilation using PyTorch's `torch.compile` for efficient execution and dynamic adjustments.

INT8 Lazy Torch Compile:

The INT8LazyTorchCompile node is designed to optimize the performance of AI models by applying lazy compilation techniques using PyTorch's torch.compile functionality. This node is particularly beneficial for AI artists and developers working with models that require efficient execution without compromising on flexibility. By deferring the compilation process until the first sampling call, it ensures that any necessary patches or modifications, such as INT8 module replacements, are active before the model is compiled. This approach not only enhances the execution speed but also allows for dynamic adjustments based on the model's requirements and the specific backend being used. The node supports various configurations, enabling users to tailor the compilation process to their specific needs, whether it's focusing on transformer blocks or the entire model. Overall, INT8LazyTorchCompile provides a streamlined and efficient way to leverage PyTorch's compilation capabilities, making it an essential tool for optimizing AI workflows.

INT8 Lazy Torch Compile Input Parameters:

model

This parameter represents the AI model that you wish to compile lazily. The model is compiled at the first sampling call, ensuring that any necessary patches, such as INT8 module replacements, are active. This approach allows for efficient execution while maintaining flexibility.

backend

The backend parameter specifies the torch.compile backend to be used. Options include "inductor" and "cudagraphs", with "inductor" being the default. This choice affects how the model is compiled and executed, with each backend offering different performance characteristics.

fullgraph

This boolean parameter determines whether a single full graph is required for the compilation process. The default value is False, which is typically recommended for Comfy workflows to maintain flexibility and efficiency.

mode

The mode parameter defines the optimization mode for torch.compile. Available options are "default", "max-autotune", "max-autotune-no-cudagraphs", and "reduce-overhead", with "default" as the default setting. Each mode offers different levels of optimization, allowing you to balance performance and resource usage.

dynamic

This parameter controls the use of dynamic shape tracing during compilation. Options include "auto", "true", and "false", with "true" as the default. Dynamic shape tracing is often safer for changing image sizes, while disabling it may offer faster performance for fixed shapes.

compile_transformer_blocks_only

A boolean parameter that, when set to True, compiles only recognized transformer block lists instead of the entire diffusion model. This approach can optimize performance by focusing on the most critical parts of the model.

dynamo_cache_size_limit

This integer parameter sets the cache size limit for torch._dynamo.config.cache_size_limit. The default value is 640, with a range from 0 to 2048. Adjusting this limit can impact the efficiency of the compilation process, especially for larger models.

use_guard_filter

A boolean parameter that, when enabled, ignores TorchDynamo guards involving transformer options. This setting matches Comfy's stock TorchCompileModel behavior and can simplify the compilation process by reducing unnecessary checks.

disable_dynamic_vram

This boolean parameter determines whether the model should be cloned with dynamic VRAM disabled. The default is True, aligning with common torch.compile practices in Comfy, and can help manage memory usage more effectively.

log_compile

A boolean parameter that, when enabled, logs the compilation process. This can be useful for debugging and understanding the compilation steps, especially when optimizing model performance.

INT8 Lazy Torch Compile Output Parameters:

MODEL

The output of the INT8LazyTorchCompile node is the compiled model, ready for efficient execution. This output represents the model after it has been optimized through lazy compilation, ensuring that all necessary patches and configurations are applied. The compiled model is designed to execute more efficiently, leveraging the benefits of the chosen backend and optimization settings.

INT8 Lazy Torch Compile Usage Tips:

  • To optimize performance for models with varying input sizes, set the dynamic parameter to "true" to enable dynamic shape tracing.
  • Use the compile_transformer_blocks_only option to focus on optimizing critical parts of the model, which can lead to faster execution times without compiling the entire model.
  • Adjust the dynamo_cache_size_limit based on the size and complexity of your model to ensure efficient caching and compilation.

INT8 Lazy Torch Compile Common Errors and Solutions:

INT8 Lazy Torch Compile: this ComfyUI version does not support disable_dynamic clone.

  • Explanation: This error occurs when the current version of ComfyUI does not support cloning the model with dynamic VRAM disabled.
  • Solution: Ensure that you are using a compatible version of ComfyUI that supports this feature, or disable the disable_dynamic_vram option.

INT8 Lazy Torch Compile: compile failed; running uncompiled.

  • Explanation: This error indicates that the compilation process encountered an issue and the model will run without being compiled.
  • Solution: Check the log for specific error messages and ensure that all input parameters are correctly configured. Adjust the log_compile setting to gather more information about the compilation process for troubleshooting.

INT8 Lazy Torch Compile Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-INT8-Toolkit
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

INT8 Lazy Torch Compile