None of the nodes showed description text in ComfyUI because ComfyUI reads obj_class.DESCRIPTION when it builds node_info - it does not read the class docstring, which is what these nodes had. Every registered node now carries a one-line DESCRIPTION, kept to 29-67 characters so it fits the limited space in ComfyUI Manager and the node search results. Image Transform Pro's four-sentence description is shortened to match. Descriptions are derived from each node's existing docstring, or from the README for the five classes that had no docstring (ImageBlendPro, ColorMatchBlend and the three Boolean switch nodes). README also updated for the recent changes: the New Nodes table now lists the real "Rotate & Scale" category, the XY placement direction is documented on both nodes (positive X right, positive Y up), and the v2.2.0 changelog records the placement convention, the node outputs and the MP_ImageTransform internal name.
29 lines
849 B
Python
29 lines
849 B
Python
class SeedLock:
|
|
"""
|
|
Lock/unlock seed value with a toggle.
|
|
When locked, outputs the locked_seed value.
|
|
When unlocked, outputs the input seed value.
|
|
"""
|
|
|
|
DESCRIPTION = "Lock a seed to reuse it, or pass the incoming seed through."
|
|
|
|
@classmethod
|
|
def INPUT_TYPES(cls):
|
|
return {
|
|
"required": {
|
|
"seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
|
|
"locked_seed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
|
|
"lock": ("BOOLEAN", {"default": False}),
|
|
},
|
|
}
|
|
|
|
RETURN_TYPES = ("INT",)
|
|
RETURN_NAMES = ("seed",)
|
|
FUNCTION = "execute"
|
|
CATEGORY = "MachinePaintingNodes/Util"
|
|
|
|
def execute(self, seed, locked_seed, lock):
|
|
if lock:
|
|
return (locked_seed,)
|
|
return (seed,)
|