Adds AI2GoResolutionSelector: a profile-aware (Ideogram 4 = x16, 256-2048) resolution node with raw/auto/megapixel modes, INT width/height outputs for any workflow, and an Apply button that pushes dims into a connected node's width/height widgets (refreshing the Ideogram 4 Prompt Builder canvas via the same write pattern the Style Wizard uses). Dims also flow on graph execution. Reverts the prompt builder's width/height to KJ-original (removes the embedded resolution_mode/aspect_ratio/megapixels widgets) so its node/JSON stays copy-paste compatible with the upstream KJNodes Ideogram 4 node. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
"""ComfyUI-AI2Go-Utils — a ComfyUI custom node pack by AIKnowledge2Go.
|
|
|
|
Node classes are registered in NODE_CLASS_MAPPINGS; their friendly labels in
|
|
NODE_DISPLAY_NAME_MAPPINGS. Front-end (JS) extensions live under ``web/`` and are
|
|
served to the ComfyUI frontend via WEB_DIRECTORY.
|
|
"""
|
|
|
|
from .nodes.ideogram4_nodes import AI2GoIdeogram4PromptBuilder
|
|
from .nodes.ideogram4_style_wizard import AI2GoIdeogram4StyleWizard
|
|
from .nodes.resolution_selector import AI2GoResolutionSelector
|
|
|
|
# Key MUST match each node's schema node_id.
|
|
NODE_CLASS_MAPPINGS = {
|
|
"AI2GoIdeogram4PromptBuilder": AI2GoIdeogram4PromptBuilder,
|
|
"AI2GoIdeogram4StyleWizard": AI2GoIdeogram4StyleWizard,
|
|
"AI2GoResolutionSelector": AI2GoResolutionSelector,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
"AI2GoIdeogram4PromptBuilder": "AI2Go Ideogram 4 Prompt Builder",
|
|
"AI2GoIdeogram4StyleWizard": "AI2Go Ideogram 4 Style Wizard",
|
|
"AI2GoResolutionSelector": "AI2Go Resolution Selector",
|
|
}
|
|
|
|
# Folder of front-end JavaScript served to the ComfyUI client.
|
|
WEB_DIRECTORY = "./web"
|
|
|
|
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
|