ComfyUI_frontend icon indicating copy to clipboard operation
ComfyUI_frontend copied to clipboard

[Bug]: Zoom level is not restored when loading workflows

Open christian-byrne opened this issue 10 months ago • 1 comments

Frontend Version

1.7.14

Expected Behavior

When the "Comfy.EnableWorkflowViewRestore" setting is enabled, the zoom level (scale) should be serialized and restored.

Actual Behavior

When saving workflows, the offset is serialized and restored but the zoom level (scale) is always 1.

Steps to Reproduce

  1. "Comfy.EnableWorkflowViewRestore"
  2. Create a new workflow
  3. Zoom out or in
  4. Save the workflow
  5. Close the workflow
  6. Load the workflow
  7. Observe zoom is not restored

Debug Logs

None

Browser Logs

None

Setting JSON

comfy.settings.json

What browsers do you use to access the UI ?

Google Chrome

Other

No response

┆Issue is synchronized with this Notion page by Unito

christian-byrne avatar Jan 18 '25 20:01 christian-byrne

The issue actually only occurs if changing the zoom level was the last change made to workflow before saving, as it's not a tracked change:

https://github.com/Comfy-Org/ComfyUI_frontend/blob/816574e0aba1425bcc047f0dcf3198e4abd1441a/src/scripts/changeTracker.ts#L393-L397

All solutions to this edge case that I can think of would not be worth the added overhead.

christian-byrne avatar Jan 18 '25 20:01 christian-byrne