https://github.com/RomanKuschanow/ComfyUI-Advanced-Latent-Control
ComfyUI extension for advanced manipulation with latent
https://github.com/RomanKuschanow/ComfyUI-Advanced-Latent-Control
ai art comfy comfyui comfyui-nodes custom-nodes generation generative generative-art latent-space plugin stable-diffusion stablediffusion
Last synced: about 2 months ago
JSON representation
ComfyUI extension for advanced manipulation with latent
- Host: GitHub
- URL: https://github.com/RomanKuschanow/ComfyUI-Advanced-Latent-Control
- Owner: kuschanow
- Created: 2024-02-25T12:23:16.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-21T07:29:14.000Z (10 months ago)
- Last Synced: 2025-02-25T02:03:19.230Z (about 2 months ago)
- Topics: ai, art, comfy, comfyui, comfyui-nodes, custom-nodes, generation, generative, generative-art, latent-space, plugin, stable-diffusion, stablediffusion
- Language: Python
- Homepage:
- Size: 67.4 KB
- Stars: 21
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-comfyui - **Advanced Latent Control**
README
# ComfyUI-Advanced-Latent-Control
**This custom nodes helps to transform latent in different ways.**
>You can access new features earlier by switching from the master branch to dev,
but you need to remember that there may be some issues on the dev branch and some nodes' behavior may change after release.## Latent mirror
This node can flip latent and merge original and flipped version.**Input:**
- `latent`**Fields:**
- `direction` – can be `vertically`, `horizontally` or `both`
- `multiplier` – multiply latent by specified number**Output:**
- `latent`**Usage:**

## Latent shift
This node can shift latent along x and y-axis.**Input:**
- `latent`**Fields:**
- `x_shift` – a number between -1 and 1 that indicates how much the latent should be shifted
- `y_shift` – a number between -1 and 1 that indicates how much the latent should be shifted**Output:**
- `latent`**Usage:**
## ~~TSampler with transforms (Latent Control)~~
Removed from version 2.0.0## TSampler (Latent Control)
This node allows to combine a lot of transforms with different parameters.**Input:**
- base KSampler fields
- transform_optional – field that can take output from one of those nodes: `Mirror transform`, `Shift transform`, `Multiply transform` or `Combine transforms`**Fields:**
exactly matches the base KSampler**Output:**
exactly matches the base KSampler**Usage:**

Multiply, Mirror and Shift transform nodes parameters exactly match the corresponding `KSampler with transforms (Latent Control)` parameters.
There are two new transform nodes:
- Latent add
- Latent interpolateThey work exactly the same as LatentAdd and LatentBlend nodes from standard node pack, but also, can multiply result by specified number.
## Offset
You can apply specific offset for transform nodes.**Fields:**
- `process_every` – a number that indicates which steps will be processed
- `offset` – a number that indicates offset for previous parameter. For example: if `process_every` is 4 and `offset` is 0, sampler apply transformation with this pattern: **0 0 0 1**. This pattern will repeat again and again. If `offset` is 2, pattern will be **0 1 0 0**, if -1 – **1 0 0 0**.
- `mode` – can be `process_every` or `skip_every`. For example, with `skip_every` previous pattern (**0 0 0 1**) turn into this: **1 1 1 0****Output:**
- `offset`**Usage:**


You can combine different offsets to achieve interesting patterns. For example:
**0 0 0 1** and **0 0 1** give this pattern: **0 0 1 1 0 1 0 1 1 0 0 1**.## One time nodes
Each transform node has own one-time version. They allow to make one transform action at specified step.
**Usage:**
## Latent normalize
Fixes some issues when sampling modified latent space.
**Input:**
exactly matches the `VAE Decode` node**Output:**
- latentWhen you multiply latent by negative or big positive (bigger than 2) number and paste this latent in sampler, you can see that the
image will be generated very poorly. This is because stable diffusion cannot work with such set of numbers (meaning the numbers contained in latent).
But you can prevent this behavior by sequential decode and encode latent using vae. Node `Latent normalize` make this process easier.

This node also change some results even if output without this node looks good.

And it very slightly changes results from latent, which have not been modified.

## Transform hijack
Allow you to use transforms with any samplers that you like.
**Inputs:**
- latent
- transforms**Outputs:**
- latent**Usage:**
