Comfy-Org / Comfy-Org/ComfyUI

Multiple workflows in single ComfyUI browser tab are not treated independently

Open
#6,581 2 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Expected Behavior

I should not be able to interfere with or see information from another workflow while working in a different workflow.
This only happens when using the Comfy workflow functionality (adding a new workflow tab within ComfyUI, all within 1 browser tab).

This does NOT occur if I open two individual browser tabs and work in 2 different workflows that way.

### Actual Behavior

I have consistently been noticing two things:

1. If I have a workflow queue running and close another workflow from within ComfyUI, that action will interrupt and kill the currently running workflow. This is not at all expected behavior as closing an unrelated workflow (but not the server itself) should not cause any negative effects.
2. If I have a workflow task running in queue, then open another workflow within ComfyUI, elements of the other workflow "bleed" into my current workflow. For instance it will appear that my ksampler is running or that I've generated a preview image in the workflow I'm in, but those things are actually happening in the first workflow.

### Steps to Reproduce

1. Open a workflow
2. Open another workflow within ComfyUI (stay in same browser tab)
3. Queue a few tasks from first workflow
4. Watch in 2nd workflow to see Sampler/Preview Image/other nodes populate with information from the first workflow.
5. Close the 2nd workflow after a task starts. It will often (always?) stop the current in process task so you'll lose a queued task.

For reference, in this image, the VAE Decode node is highlighted as running in my 2nd workflow, but it is actually only running in the workflow I am not viewing:
![Image](https://github.com/user-attachments/assets/e97ae31a-f016-4ab2-870f-a5e534038096)

### Debug Logs

```powershell
I do not see any debug logging as it is not showing an actual error.

For reference I am running in Firefox browser (saw same behavior on Edge) in Windows 11.

System info:
OS
nt
Python Version
3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
Embedded Python
false
Pytorch Version
2.5.1+cu124
Arguments
main.py --use-sage-attention --front-end-version Comfy-Org/ComfyUI_frontend@latest
```

### Other

_No response_

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.