-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: New Mask Editor has terrible mouse lag while moving cursor in paint zone. #1851
Comments
I'm investigating the issue. The async pulls are not the issue because they're only asynchronous due to the messageBroker object's pull function design. Most of them just retrieve object variables. To be sure, I timed updateBrushPreview with and without the async pulls and got nearly identical completion times. I also implemented some rounding on the variables to optimize calculations, but this doesn't seem to make much difference either. I noticed some improvements in lag spikes, but I'm not sure if it's actually better or just confirmation bias. I will investigate further. I want to add that I can't reproduce any performance difference that I would describe as huge. I definitely see a performance loss compared to the old mask editor, but at least for me, the difference is not that significant. Could you @StDiffusionKnight share your hardware specifications? How much available RAM do you have? Are you using any Chrome extensions that might impact performance? |
@trsommer Found the possible culprit: Browser graphics acceleration. With acceleration on: On.mp4With acceleration off: Off.mp4Debug logs:E:\>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build --disable-all-custom-nodes --front-end-version Comfy-Org/ComfyUI_frontend@latest
Total VRAM 8192 MB, total RAM 65277 MB
pytorch version: 2.6.0.dev20241216+cu124
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3070 Ti Laptop GPU : cudaMallocAsync
Using pytorch attention
Initializing frontend: Comfy-Org/ComfyUI_frontend@latest, requesting version details from GitHub...
[Prompt Server] web root: E:\ComfyUI\web_custom_versions\Comfy-Org_ComfyUI_frontend\1.6.1
Skipping loading of custom nodes
Starting server
To see the GUI go to: http://127.0.0.1:8188 |
Frontend Version
Latest
Expected Behavior
smooth mouse cursor
Actual Behavior
laggy mouse cursor
Steps to Reproduce
Create a new workspace - with updated to latest frontend - paste image - right click - Open in Mask Editor - try to move a mouse in paint area. Then go to settings Mask Editor - Turn Old Version - select image - right click - Open in Mask Editor - try to move a mouse in paint area. There will be huge difference.
Debug Logs
Browser Logs
none
Setting JSON
all default - except using latest frontend
What browsers do you use to access the UI ?
Google Chrome
Other
My guess it's a really terrible idea to use several await in function which is called during mousemove event. Probably that's why I don't see exact slow function execution in performance captured trace.
┆Issue is synchronized with this Notion page by Unito
The text was updated successfully, but these errors were encountered: