Legacy Widget Width Fix (temporary)
Your node widgets keep freezing when you resize? This bugfix node unsticks them
You resize a node and its widgets don't follow. The sliders stay squished, or overflow the node body, or just float in dead space. Move the node and it gets worse. It looks like your whole setup is broken - and it isn't, it's one bad line in ComfyUI's own frontend. This node is a stopgap that fixes it without you touching your ComfyUI install.
What it actually is
Legacy Widget Width Fix is a single node called Legacy Widget Width Fix (temporary) that lives under utils/bugfix in the Add Node menu. It's not a filter, not a model loader, not a generator. It has no inputs, no outputs, and does nothing when you run the graph. Its entire job is to exist in your workflow: the frontend extension watches for it, and while it's present, it patches the bug live.
The bug is a ComfyUI frontend regression (Comfy-Org/ComfyUI_frontend #12443, introduced by #11574). In LiteGraph mode - that's the classic canvas renderer, i.e. not the new Vue-based "Nodes 2.0" renderer that's been rolling out - one line in WidgetLegacy.vue writes widget.width = width on every draw call. Once a widget has a concrete width number, LiteGraph's renderer ignores the node's actual size (widget.width || nodeWidth) and widgets stop tracking the node boundary forever after. Since many of us are still on the legacy canvas because popular packs like rgthree don't fully work under Nodes 2.0 yet, that's a lot of people who hit this.
How the fix works
The mechanism lives in web/bugfix.js, not in Python. The moment you add the node, the extension:
- Hooks
LGraphNode.prototype.addWidget(plusaddDOMWidgetandaddCustomWidget, so it catches widgets created by any pack) and replaces each widget'swidthproperty with a getter/setter. - Rewraps existing widgets in the graph the same way.
- The setter drops width writes while the patch is active and LiteGraph mode is in control - the bug's writes just vanish.
- On a repair, it clears the stale width back to
undefinedso renderers fall back tonode.size[0]again.
It's reference-counted: the patch stays installed until the last copy of the node is removed, and removing it fully reverts everything. If you're on a frontend build that already contains the upstream fix, the node is a no-op - LiteGraph.vueNodesMode is true where writes are legit, so nothing gets dropped and you can leave the node sitting there or delete it. Forgetting about it after the upstream patch lands is harmless; it just stops doing anything.
The node also has a "Repair widget widths now" button on its face (added by the extension, not a graph parameter) as a manual fallback if new nodes somehow slip through.
Install
No Python dependencies, no models, no requirements.txt - it's pure frontend JS plus a stub Python class. Either way, restart ComfyUI after:
cd ComfyUI/custom_nodes
git clone https://github.com/pekkAi-dev/ComfyUI-LegacyWidgetWidthFix
Or via ComfyUI Manager if it's in the registry. Then right-click → Add Node → utils/bugfix → Legacy Widget Width Fix (temporary).
Troubleshooting
- Widgets still broken after adding it? Refresh the browser page once. Existing widgets get rewrapped on the fly, but the author's README is explicit that a refresh is the reliable way to get everything clean.
- Don't want it anymore? Delete the node and refresh - that's the whole revert path. It's deliberately low-risk: drop in, refresh, check. Not working? Delete it.
- If you're already on the Vue renderer / patched frontend, you won't see a difference, because there's no bug to fix. That's expected, not a failure.
- It's a temporary node. The real fix is upstream in
WidgetLegacy.vue; this exists so people don't have to patch ComfyUI by hand until ComfyOrg ships it. When that lands, keep or remove the node at your leisure - it becomes a no-op either way.
One more thing in its favor: no Manager entry, no sneaky code pulled in on update-all. The node is exactly what it says it is, and it goes away when you don't need it.
Inputs (0)
No inputs
Outputs (0)
No outputs