diff --git a/CHANGELOG.md b/CHANGELOG.md index 532a646..2f21e77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,9 @@ # v3.0.0 - From now on, the major version number will reflect the Comfy's node API version used. -- `❗ MAJOR` internal change: All the nodes migrated to Comfy's nodes v3 API schema. +- `❗ MAJOR` internal changes: + - **All the nodes migrated to Comfy's nodes v3 API schema.** + - Shorter class names. - Increased widget precision for various float inputs. - No other new features or changes in behavior. diff --git a/__init__.py b/__init__.py index 295c9f5..30c5286 100644 --- a/__init__.py +++ b/__init__.py @@ -10,25 +10,25 @@ try: class BestResolutionExtension(_ComfyExtension): @_override async def get_node_list(self) -> list[type[_io.ComfyNode]]: - from .node_crop_pad import BestResolutionUpscaledCropPad - from .node_scale import BestResolutionScale + from .node_crop_pad import BRUpscaledCropPad + from .node_scale import BRScale from .node_upscale_by import ImageUpscaleByWithModel - from .nodes_prims import BestResolutionPrimResPriority, BestResolutionPrimCropPadStrategy - from .nodes_simple import BestResolutionSimple, BestResolutionFromAspectRatio, BestResolutionFromArea - from .nodes_upscale import BestResolutionFromAreaUpscale + from .nodes_prims import PrimResPriority, PrimCropPadStrategy + from .nodes_simple import BRSimple, BRFromAspectRatio, BRFromArea + from .nodes_upscale import BRFromAreaUpscale return [ - BestResolutionFromArea, - BestResolutionFromAreaUpscale, - BestResolutionFromAspectRatio, - BestResolutionSimple, + BRFromArea, + BRFromAreaUpscale, + BRFromAspectRatio, + BRSimple, - BestResolutionScale, + BRScale, - BestResolutionPrimCropPadStrategy, - BestResolutionPrimResPriority, + PrimCropPadStrategy, + PrimResPriority, - BestResolutionUpscaledCropPad, + BRUpscaledCropPad, ImageUpscaleByWithModel, ] diff --git a/node_crop_pad.py b/node_crop_pad.py index ecb12e6..06354a0 100644 --- a/node_crop_pad.py +++ b/node_crop_pad.py @@ -17,7 +17,7 @@ from .funcs_crop_pad import upscaled_crop_pad as _upscaled_crop_pad # ---------------------------------------------------------- -class BestResolutionUpscaledCropPad(_io.ComfyNode): +class BRUpscaledCropPad(_io.ComfyNode): """ If the original resolution can't be scaled to the higher one uniformly (i.e., without stretching), this node detects the appropriate values for cropping/out-painting. diff --git a/node_scale.py b/node_scale.py index ec994ff..ac723ce 100644 --- a/node_scale.py +++ b/node_scale.py @@ -14,7 +14,7 @@ from .__docstring_formatter import format_docstring as _format_docstring from .funcs import simple_result_from_approx_wh as _simple_result_from_approx_wh -class BestResolutionScale(_io.ComfyNode): +class BRScale(_io.ComfyNode): """ Scale width and height by the same value + round them. """ diff --git a/nodes_prims.py b/nodes_prims.py index ce9bf59..eaafb49 100644 --- a/nodes_prims.py +++ b/nodes_prims.py @@ -15,7 +15,7 @@ from .__docstring_formatter import format_docstring as _format_docstring # ---------------------------------------------------------- -class BestResolutionPrimResPriority(_io.ComfyNode): +class PrimResPriority(_io.ComfyNode): """ 'priority' selector for "Best Resolution" upscale-nodes. """ @@ -45,7 +45,7 @@ class BestResolutionPrimResPriority(_io.ComfyNode): # ---------------------------------------------------------- -class BestResolutionPrimCropPadStrategy(_io.ComfyNode): +class PrimCropPadStrategy(_io.ComfyNode): """ 'strategy' selector for "Upscaled Crop/Pad" node in "Best Resolution" pack. """ diff --git a/nodes_simple.py b/nodes_simple.py index 57972ec..1e5f8e9 100644 --- a/nodes_simple.py +++ b/nodes_simple.py @@ -22,7 +22,7 @@ from .funcs import ( # ---------------------------------------------------------- -class BestResolutionSimple(_io.ComfyNode): +class BRSimple(_io.ComfyNode): """ The simplest node for easier selection of an optimal resolution: only rounding performed, desired image size specified directly. @@ -67,7 +67,7 @@ class BestResolutionSimple(_io.ComfyNode): # ---------------------------------------------------------- -class BestResolutionFromAspectRatio(_io.ComfyNode): +class BRFromAspectRatio(_io.ComfyNode): """ A more advanced node for easier selection of an optimal resolution: image size selected indirectly - by one of the sides + aspect ratio. @@ -89,7 +89,7 @@ class BestResolutionFromAspectRatio(_io.ComfyNode): hidden=[_io.Hidden.unique_id], - outputs=list(BestResolutionSimple._schema.outputs), + outputs=list(BRSimple._schema.outputs), is_output_node=True, ) @@ -124,7 +124,7 @@ class BestResolutionFromAspectRatio(_io.ComfyNode): # ---------------------------------------------------------- -class BestResolutionFromArea(_io.ComfyNode): +class BRFromArea(_io.ComfyNode): """ The most efficient way of selecting an optimal resolution: image size selected indirectly - by the total desired resolution (area) + aspect ratio. @@ -155,7 +155,7 @@ class BestResolutionFromArea(_io.ComfyNode): hidden=[_io.Hidden.unique_id], - outputs=list(BestResolutionSimple._schema.outputs), + outputs=list(BRSimple._schema.outputs), is_output_node=True, ) diff --git a/nodes_upscale.py b/nodes_upscale.py index 6f0c2da..7a6d54c 100644 --- a/nodes_upscale.py +++ b/nodes_upscale.py @@ -21,11 +21,11 @@ from .funcs import ( float_width_height_from_area as _float_width_height_from_area, upscale_result_from_approx_wh as _upscale_result_from_approx_wh ) -from .nodes_simple import BestResolutionFromArea as _BestResolutionFromArea +from .nodes_simple import BRFromArea as _BestResolutionFromArea # ---------------------------------------------------------- -class BestResolutionFromAreaUpscale(_io.ComfyNode): +class BRFromAreaUpscale(_io.ComfyNode): """ The most efficient way of selecting an optimal resolution: image size selected indirectly - by the total desired resolution (area) + aspect ratio...