Skip to content

Commit f443b9f

Browse files
Revert "feat: Improve ResizeImageMaskNode UX with tooltips and search aliases…" (#12038)
This reverts commit 4e30381.
1 parent 4e30381 commit f443b9f

File tree

1 file changed

+25
-41
lines changed

1 file changed

+25
-41
lines changed

comfy_extras/nodes_post_processing.py

Lines changed: 25 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -420,63 +420,47 @@ class ResizeTypedDict(TypedDict):
420420
@classmethod
421421
def define_schema(cls):
422422
template = io.MatchType.Template("input_type", [io.Image, io.Mask])
423-
crop_combo = io.Combo.Input(
424-
"crop",
425-
options=cls.crop_methods,
426-
default="center",
427-
tooltip="How to handle aspect ratio mismatch: 'disabled' stretches to fit, 'center' crops to maintain aspect ratio.",
428-
)
423+
crop_combo = io.Combo.Input("crop", options=cls.crop_methods, default="center")
429424
return io.Schema(
430425
node_id="ResizeImageMaskNode",
431426
search_aliases=["scale image", "scale mask"],
432427
display_name="Resize Image/Mask",
433-
description="Resize an image or mask using various scaling methods.",
434428
category="transform",
435-
search_aliases=["resize", "resize image", "resize mask", "scale", "scale image", "image resize", "change size", "dimensions", "shrink", "enlarge"],
436429
inputs=[
437430
io.MatchType.Input("input", template=template),
438-
io.DynamicCombo.Input(
439-
"resize_type",
440-
tooltip="Select how to resize: by exact dimensions, scale factor, matching another image, etc.",
441-
options=[
442-
io.DynamicCombo.Option(ResizeType.SCALE_DIMENSIONS, [
443-
io.Int.Input("width", default=512, min=0, max=MAX_RESOLUTION, step=1, tooltip="Target width in pixels. Set to 0 to auto-calculate from height while preserving aspect ratio."),
444-
io.Int.Input("height", default=512, min=0, max=MAX_RESOLUTION, step=1, tooltip="Target height in pixels. Set to 0 to auto-calculate from width while preserving aspect ratio."),
445-
crop_combo,
431+
io.DynamicCombo.Input("resize_type", options=[
432+
io.DynamicCombo.Option(ResizeType.SCALE_BY, [
433+
io.Float.Input("multiplier", default=1.00, min=0.01, max=8.0, step=0.01),
446434
]),
447-
io.DynamicCombo.Option(ResizeType.SCALE_BY, [
448-
io.Float.Input("multiplier", default=1.00, min=0.01, max=8.0, step=0.01, tooltip="Scale factor (e.g., 2.0 doubles size, 0.5 halves size)."),
435+
io.DynamicCombo.Option(ResizeType.SCALE_DIMENSIONS, [
436+
io.Int.Input("width", default=512, min=0, max=MAX_RESOLUTION, step=1),
437+
io.Int.Input("height", default=512, min=0, max=MAX_RESOLUTION, step=1),
438+
crop_combo,
449439
]),
450-
io.DynamicCombo.Option(ResizeType.SCALE_LONGER_DIMENSION, [
451-
io.Int.Input("longer_size", default=512, min=0, max=MAX_RESOLUTION, step=1, tooltip="The longer edge will be resized to this value. Aspect ratio is preserved."),
440+
io.DynamicCombo.Option(ResizeType.SCALE_LONGER_DIMENSION, [
441+
io.Int.Input("longer_size", default=512, min=0, max=MAX_RESOLUTION, step=1),
452442
]),
453-
io.DynamicCombo.Option(ResizeType.SCALE_SHORTER_DIMENSION, [
454-
io.Int.Input("shorter_size", default=512, min=0, max=MAX_RESOLUTION, step=1, tooltip="The shorter edge will be resized to this value. Aspect ratio is preserved."),
443+
io.DynamicCombo.Option(ResizeType.SCALE_SHORTER_DIMENSION, [
444+
io.Int.Input("shorter_size", default=512, min=0, max=MAX_RESOLUTION, step=1),
455445
]),
456-
io.DynamicCombo.Option(ResizeType.SCALE_WIDTH, [
457-
io.Int.Input("width", default=512, min=0, max=MAX_RESOLUTION, step=1, tooltip="Target width in pixels. Height auto-adjusts to preserve aspect ratio."),
446+
io.DynamicCombo.Option(ResizeType.SCALE_WIDTH, [
447+
io.Int.Input("width", default=512, min=0, max=MAX_RESOLUTION, step=1),
458448
]),
459-
io.DynamicCombo.Option(ResizeType.SCALE_HEIGHT, [
460-
io.Int.Input("height", default=512, min=0, max=MAX_RESOLUTION, step=1, tooltip="Target height in pixels. Width auto-adjusts to preserve aspect ratio."),
449+
io.DynamicCombo.Option(ResizeType.SCALE_HEIGHT, [
450+
io.Int.Input("height", default=512, min=0, max=MAX_RESOLUTION, step=1),
461451
]),
462-
io.DynamicCombo.Option(ResizeType.SCALE_TOTAL_PIXELS, [
463-
io.Float.Input("megapixels", default=1.0, min=0.01, max=16.0, step=0.01, tooltip="Target total megapixels (e.g., 1.0 ≈ 1024×1024). Aspect ratio is preserved."),
452+
io.DynamicCombo.Option(ResizeType.SCALE_TOTAL_PIXELS, [
453+
io.Float.Input("megapixels", default=1.0, min=0.01, max=16.0, step=0.01),
464454
]),
465-
io.DynamicCombo.Option(ResizeType.MATCH_SIZE, [
466-
io.MultiType.Input("match", [io.Image, io.Mask], tooltip="Resize input to match the dimensions of this reference image or mask."),
467-
crop_combo,
455+
io.DynamicCombo.Option(ResizeType.MATCH_SIZE, [
456+
io.MultiType.Input("match", [io.Image, io.Mask]),
457+
crop_combo,
468458
]),
469-
io.DynamicCombo.Option(ResizeType.SCALE_TO_MULTIPLE, [
470-
io.Int.Input("multiple", default=8, min=1, max=MAX_RESOLUTION, step=1, tooltip="Resize so width and height are divisible by this number. Useful for latent alignment (e.g., 8 or 64)."),
459+
io.DynamicCombo.Option(ResizeType.SCALE_TO_MULTIPLE, [
460+
io.Int.Input("multiple", default=8, min=1, max=MAX_RESOLUTION, step=1),
471461
]),
472-
],
473-
),
474-
io.Combo.Input(
475-
"scale_method",
476-
options=cls.scale_methods,
477-
default="area",
478-
tooltip="Interpolation algorithm. 'area' is best for downscaling, 'lanczos' for upscaling, 'nearest-exact' for pixel art.",
479-
),
462+
]),
463+
io.Combo.Input("scale_method", options=cls.scale_methods, default="area"),
480464
],
481465
outputs=[io.MatchType.Output(template=template, display_name="resized")]
482466
)

0 commit comments

Comments
 (0)