Comfy-Org / Comfy-Org/ComfyUI

Latent From Batch does not reproduce original image from batch

Open
#12,051 4 comments 1 reaction 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

When generating a batch of images, the seed is shared with all of the images.

In order to reproduce a specific image in the batch, you must use the `Latent From Batch` node.

### Actual Behavior

However, the `Latent From Batch` node does not actually reproduce the image from the original batch.

### Steps to Reproduce

Run this workflow image (this will generate a batch of 4 images):

Image

Then run this workflow image (this will generate a single image):

Image

The single image is similar to the batched image, but they are not identical.

In some cases the single image can be *significantly* different from the batched image.

### Debug Logs

```powershell
** Platform: Linux
** Python version: 3.10.16 | packaged by conda-forge | (main, Dec 5 2024, 14:16:10) [GCC 13.3.0]
** Python executable: /home/pauan/.config/pinokio/api/comfy.git/app/env/bin/python
** ComfyUI Path: /home/pauan/.config/pinokio/api/comfy.git/app
** ComfyUI Base Folder Path: /home/pauan/.config/pinokio/api/comfy.git/app
** User directory: /home/pauan/.config/pinokio/api/comfy.git/app/user
** ComfyUI-Manager config path: /home/pauan/.config/pinokio/api/comfy.git/app/user/default/ComfyUI-Manager/config.ini
** Log path: /home/pauan/.config/pinokio/api/comfy.git/app/user/comfyui.log

Checkpoint files will always be loaded safely.
Total VRAM 15838 MB, total RAM 96175 MB
pytorch version: 2.7.0+cu128
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5070 Ti : cudaMallocAsync
Using async weight offloading with 2 streams
Enabled pinned memory 91365.0
Using pytorch attention
Python version: 3.10.16 | packaged by conda-forge | (main, Dec 5 2024, 14:16:10) [GCC 13.3.0]
ComfyUI version: 0.3.76
ComfyUI frontend version: 1.33.10
[Prompt Server] web root: /home/pauan/.config/pinokio/api/comfy.git/app/env/lib/python3.10/site-packages/comfyui_frontend_package/static
### ComfyUI Version: v0.3.76-4-ga17cf1c3 | Released on '2025-12-01'

Context impl SQLiteImpl.
Will assume non-transactional DDL.
No target revision found.
```

### Other

I have tried different models, samplers, schedulers, and batch sizes. They all reproduce this bug.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.