39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
class LegacyWidgetWidthFix:
|
|
"""
|
|
Drop-in workaround for the LiteGraph-mode widget width regression
|
|
introduced by ComfyUI_frontend #11574 and tracked in #12443.
|
|
|
|
The actual patch lives in web/bugfix.js. This Python class only exists
|
|
so the node can be added to a workflow; its presence in the graph is
|
|
what activates the frontend patch. Remove the node and the patch
|
|
uninstalls itself.
|
|
|
|
Only needed until ComfyOrg patches the bug upstream.
|
|
"""
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {"required": {}}
|
|
|
|
RETURN_TYPES = ()
|
|
FUNCTION = "noop"
|
|
CATEGORY = "utils/bugfix"
|
|
DESCRIPTION = (
|
|
"Workaround for LiteGraph-mode widget width bug "
|
|
"(ComfyUI_frontend #12443). New nodes are repaired automatically; "
|
|
"use the button to rescan manually. Only needed until ComfyOrg "
|
|
"patches the bug."
|
|
)
|
|
|
|
def noop(self):
|
|
return ()
|
|
|
|
|
|
NODE_CLASS_MAPPINGS = {
|
|
"LegacyWidgetWidthFix": LegacyWidgetWidthFix,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"LegacyWidgetWidthFix": "Legacy Widget Width Fix (temporary)",
|
|
}
|