Comfy-Org / Comfy-Org/ComfyUI_frontend

Sampling preview disappears during gen if ctrl+z is pressed or when navigating to another open workflow

Open
#6,424 3 comments 1 reaction 0 assignees View on GitHub
area:ui area:workflows Potential Bug
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

### Expected Behavior

KSampler (and other sampler nodes) keep the preview going during the whole generation process

### Actual Behavior

As soon as ctrl+z is pressed, or a sampling step is done while the active workflow isn't the one in focus, the sampler node loses the preview. The preview doesn't return for the rest of the generation process

### Steps to Reproduce

Start generating an image or video with previews enabled (I use Latent2RGB). Once the preview is visible, press ctrl-z. The sampler preview is now gone.
Alternatively, open a different workflow while the sampling is running, wait for a sampling step to complete, switch back to currently running workflow. The sampler preview is now gone.

### Debug Logs

```powershell
No relevant logs.
```

### Other

_No response_

---

*This issue is transferred from: https://github.com/comfyanonymous/ComfyUI/issues/7468*

Original issue was created by @BiiirdPrograms at 2025-04-02T05:21:41.000Z

**Original Comments:**

@Lookplanes:

Also the sampler preview will keep not updating if you switch the browser running ComfyUI to the background. I believe this might be an optimization made by the author to save computing resources, but I think there should be an option in the settings to allow the sampler preview to keep running even in the background, because sometimes multi-stage sampling workflows require checking the intermediate outputs.

@ltdrdata:

The issue arises from the current structure where messages sent from the backend to the frontend, including the live preview, are tied to the client rather than the workflow session.

With the new frontend now supporting multiple workflows—a feature that didn’t exist before—a mismatch between the backend and frontend has emerged.

@christian-byrne @huchenlei Do we currently have any improvement plans for this?

@christian-byrne:

I compiled all tab-graph-prompt sync issues here: https://github.com/Comfy-Org/ComfyUI_frontend/issues/3377. To my knowledge, this is not currently being worked on by anyone.

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-6424-Sampling-preview-disappears-during-gen-if-ctrl-z-is-pressed-or-when-navigating-to-anot-29c6d73d365081b899dcc1bb24aafaa4) by [Unito](https://www.unito.io)

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.