> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-comfy-docs-comfyapi-search.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LatentApplyOperationCFG - ComfyUI Built-in Node Documentation

> The LatentApplyOperationCFG node applies a latent operation inside the classifier-free guidance (CFG) step of a model's sampling process.

The LatentApplyOperationCFG node applies a latent operation inside the classifier-free guidance (CFG) step of a model's sampling process. It intercepts the conditioning outputs produced before CFG, applies the connected operation to the latent values, and returns the model with this modified sampling behavior.

## Inputs

| Parameter   | Description                                                   | Data Type         | Required | Range |
| ----------- | ------------------------------------------------------------- | ----------------- | -------- | ----- |
| `model`     | The model to which the CFG operation will be applied          | MODEL             | Yes      | -     |
| `operation` | The latent operation to apply during the CFG sampling process | LATENT\_OPERATION | Yes      | -     |

Note: This node is marked as experimental. The operation is applied to the model's conditioning outputs during the CFG sampling process. When two conditioning outputs are present, the operation is applied to the difference between the first and second output, and the second output is added back to the result. When only one conditioning output is present, the operation is applied directly to it.

## Outputs

| Output Name | Description                                                               | Data Type |
| ----------- | ------------------------------------------------------------------------- | --------- |
| `model`     | The modified model with the CFG operation applied to its sampling process | MODEL     |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/LatentApplyOperationCFG/en.md)

***

**Source fingerprint (SHA-256):** `e383684a785878bfa4004c2fac78ae562d8e035fdfe081f8e4ebbb2c50161987`
