Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-Y7Nodes

ComfyUI Extension: ComfyUI-Y7Nodes

Repo Name

ComfyUI-Y7Nodes

Author
yushan777 (Account age: 1391 days)
Nodes
View all nodes(1)
Latest Updated
2026-10-17
Github Stars
0.01K

How to Install ComfyUI-Y7Nodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-Y7Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Y7Nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI-Y7Nodes Description

ComfyUI-Y7Nodes adds utility nodes for image sizing, prompt inspection, editing, comparison, captioning, and saving, alongside specialized Flux.2 Klein and Krea 2 sampling workflows.

ComfyUI-Y7Nodes Introduction

ComfyUI-Y7Nodes is a collection of utility nodes for ComfyUI. The author created and adapted them to make common image-making tasks easier to manage inside a workflow. Some nodes provide quick controls for image size and prompts; others help with editing, comparing, captioning, saving, or sampling images.

You do not need to use the whole collection. Add the nodes that solve a particular problem:

  • Plan image dimensions with a draggable aspect-ratio picker, presets, or megapixel-based selectors.
  • Inspect text and results with token counters and a display node that can copy its contents.
  • Prepare and edit images with scaling, cropping, padding, color matching, alignment, and paste-back tools.
  • Build specialized workflows for Flux.2 Klein and Krea 2.
  • Process image collections by loading files with their paths and saving captions beside them.

The extension does not provide a single image-generation model of its own. Its nodes work with images, text, and compatible models that you connect in ComfyUI. Some specialized nodes have additional model requirements, described below.

How ComfyUI-Y7Nodes Works

A ComfyUI workflow passes information between connected nodes. Think of the nodes as tools at different points in an art process: one chooses the canvas size, another supplies a prompt, another edits an image, and another shows or saves the result. ComfyUI-Y7Nodes adds more choices at those points without requiring every workflow to use every node.

For example, you could drag on Y7 Aspect Ratio Picker to choose a portrait canvas, connect its width and height outputs to a node that creates an empty image, and generate from there. For a local edit, you could enlarge a canvas with Y7 Pad Image for Outpainting, edit a region, then use Y7 Paste Cropped Image Back to place a refined crop into the original picture.

A few terms used throughout this README:

  • Aspect ratio describes a picture’s shape. 1:1 is square; 16:9 is wide.
  • Megapixels describe total image area, not just width. Roughly one million pixels equals one megapixel.
  • A mask marks an area for a particular operation. Its meaning depends on the node: white may mark an edit area in one node but an area excluded from color matching in another. Check the node description before connecting a mask.
  • A latent is an internal image representation used during generation. You generally decode it through a VAE to see the finished image.
  • Conditioning carries prompt information to a sampler. Some specialized nodes also attach reference-image information to it.

ComfyUI-Y7Nodes Features

Canvas Size and Image Preparation

Y7 Aspect Ratio Picker lets you choose width and height by clicking or dragging on a two-dimensional canvas. Move left to right to change width and bottom to top to change height. The node shows the selected shape, simplified ratio, dimensions, and total megapixels. Double-click a displayed dimension to enter it directly, or use Swap to exchange width and height. Dragging snaps to increments by default; hold Shift to temporarily turn snapping off. Its right-click Properties include minimums, maximums, steps, snapping, and dot-display settings. It outputs integer width and height.

<img src="assets/aspect_ratio_picker.jpg" alt="Y7 Aspect Ratio Picker showing its draggable size canvas" width="50%"/>

Y7 Image Size (Presets) supplies width and height from a named size set. Choose default, flux.2, qwen-image, or custom*, then select a dimension from the dropdown. Choose Custom in that dropdown to enter custom_w and custom_h yourself. The custom* set reads custom_dimensions.json from the extension’s nodes directory; if that file is missing or invalid, the node falls back to default.

Y7 Resolution Selector calculates width and height from an aspect ratio and a target megapixel count. Set multiple to round the calculated dimensions to the nearest multiple, such as the default of 8. Compared with ComfyUI’s built-in V3 ResolutionSelector, this version offers a finer megapixels adjustment of 0.01, accepts targets up to 60.0 megapixels, and shows the calculated resolution on the node after execution. Its default target is 1.0 megapixel.

Y7 Dual Resolution Selector calculates two sizes at the same aspect ratio: a smaller base size and a final size. It is intended for workflows that generate at one resolution and finish at another, such as the Krea 2 multi-stage samplers. Connect base_width and base_height to the starting latent, and final_width and final_height to the sampler. The defaults are 1.0 base megapixels, 2.0 final megapixels, and dimensions rounded to a multiple of 16.

Y7 Scale Image By multiplies an image’s width and height by scale_by while preserving its shape. For example, 2.0 doubles each dimension; 0.5 halves each dimension. You can choose nearest-exact, bilinear, area, bicubic, or lanczos resizing and use resolution_steps to snap the result to a chosen multiple. The node outputs the scaled image and its dimensions.

Y7 Scale Image to Total Pixels instead aims for a target total area in megapixels while keeping the image’s aspect ratio. This is useful when images of different shapes should have approximately the same pixel budget. It offers the same resizing methods and dimension snapping as Scale Image By. Because dimensions are rounded, the final pixel count may differ slightly from the target.

Y7 Crop to Nearest Multiple trims an image down so its dimensions are divisible by a value you choose, typically 8 or 16. A red overlay on crop_preview shows the pixels that would be removed; cropped_image contains the result, and info explains what happened. Set horizontal and vertical crop positions separately to protect the part of the composition that matters. Setting either position to none leaves that dimension unchanged. A dimension already divisible by multiple is not cropped.

Y7 Pad Image for Outpainting adds space around an image before an outpainting step. Set the pixels to add on each side; padding is rounded to a multiple of step (default 16). Choose a starting fill for the new area: grey, edge replicate, mirror, blurred edge, or noise. feathering softens the join with the original image. The node outputs both the untouched original and the padded image, plus a mask identifying the new area and the padded dimensions.

Text, Prompts, and Workflow Controls

Y7 Show Anything displays values from many kinds of nodes in a readable form. It primarily shows strings, integers, decimal numbers, and true/false values, and also attempts to display tensor data. Use Copy Text when you want to take a long generated prompt or a diagnostic report elsewhere.

<img src="assets/show_anything.jpg" alt="Y7 Show Anything displaying node output with a Copy Text button" width="100%"/>

Y7 Text is a multiline text box that passes its contents to a STRING output. It works well as one shared prompt source for several downstream nodes.

Y7 Float supplies a decimal value that can change as prompts are queued. Leave control_after_generate at fixed to keep it constant, or select increment or decrement to move it by the node’s step each prompt. For example, you could test a sequence of denoise or LoRA-strength values. The displayed value has two decimal places, so a finer step can work even when its full precision is not visible. ComfyUI’s Widget Control Mode determines whether the displayed value is the next one to be used or the one just used. Connecting an input to value turns automatic stepping off.

Y7 CLIP Token Counter examines text with a CLIP tokenizer. It reports the token count, the final token within the stated 77-token limit (including beginning- and end-of-sequence tokens), nearby context, and any overflow tokens. It also provides Copy Text and passes the original text through. Use it to inspect how a prompt is divided into tokens rather than judging its length by words alone.

<img src="assets/clip_token_count.jpg" alt="Y7 CLIP Token Counter displaying a prompt's tokens" width="100%"/>

Y7 T5 Token Counter provides similar information using a T5 XXL tokenizer and checks against a 256- or 512-token limit, including the end-of-sequence token. It displays in-range and overflow tokens, offers Copy Text, and passes the original text through.

<img src="assets/t5_token_count.jpg" alt="Y7 T5 Token Counter displaying token counts and overflow" width="100%"/>

Y7 Prompt Enhancer (Native) expands a basic prompt using a compatible text encoder that you have already loaded through ComfyUI. Connect that encoder to clip, provide your prompt in text, and adjust instruction to describe the enhancement style you want. The node returns the usable enhanced_prompt separately from any thinking_output the encoder produces.

Its generation controls include max_length for the maximum new tokens, temperature, top_k, top_p, seed, and thinking. A higher token budget can give a reasoning-capable model room to finish its answer, but also increases memory demand. Change seed to request another result when identical inputs would otherwise return a cached one. This node does not download or load an encoder independently; ComfyUI handles the encoder connected to clip.

Sampler Select (Name) outputs a sampler’s name as a connectable string. It is useful when you need to pass a sampler choice through a link instead of choosing it only inside a KSampler widget.

Switch (model) selects one of up to ten connected MODEL inputs. Set select to 1 for model_1, 2 for model_2, and so forth; selected_index reports which socket was actually used. Another empty socket appears as you connect the last available one. Its unselected inputs are lazy, so their model loaders do not need to read weights from disk merely because they are wired into the switch. If a linked selection points to an empty socket, the node falls back to a connected one; it errors if no model is connected.

Comparing and Finishing Images

Y7 Image Stitcher joins two to eight images into one image. Set image_count to show the number of input sockets you need; unconnected sockets are skipped. In horizontal mode it matches every image to the first image’s height and joins them left to right. In vertical mode it matches widths and stacks them top to bottom. This is useful for contact-sheet-style comparisons, though resizing may change the dimensions of images after the first.

Y7 Image Compare gives you a draggable, on-node comparison of image_a and optional image_b. Use normal mode for a wipe between images or difference to emphasize variations. The preview responds as you drag; slider position and blend mode are saved with the workflow. You can right-click the preview for Open Image or Save Image. This is a preview-only node and has no output sockets. It is based on Eses Image Compare by Eses Nodes.

Y7 Color Match (Masked) adjusts a target image toward a reference image while excluding masked regions from the color calculation on both images. For example, after changing a red car to blue, you can use the unedited background to correct an unwanted color shift without letting the new blue car skew the comparison. White in mask marks the region to exclude; without a mask, the whole image is matched. Choose among mkl, hm, reinhard, mvgd, hm-mvgd-hm, and hm-mkl-hm. Use strength to blend the correction with the original target and feather to soften the mask boundary. This node uses the color-matcher package and is based on the ColorMatch node from kijai’s ComfyUI-KJNodes.

Y7 Klein & Qwen Edit Align addresses edits whose entire frame comes back slightly shifted, scaled, or tinted. Give it the edited_image and original_image; it aligns the edited result to the original and color-matches it using background areas. color_match_strength controls that color correction, while two_pass (on by default) repeats alignment using background features to reduce the edit’s influence. An optional edit_mask identifies the edited region. Outputs are aligned_image, a valid_mask marking pixels drawn from outside the frame, and a diagnostic report. It handles overall geometric changes, not uneven local warping, and does not composite the result for you.

Y7 Paste Cropped Image Back places an edited crop into a region of a base image. It is useful after enlarging and refining a face, hand, or other detail separately. left and top measure from the corresponding image edges; right and bottom measure inward from the opposite edges. The crop is resized to fit that region exactly, so mismatched proportions can stretch it. crop_blending softens the paste boundary, and crop_sharpening applies up to three sharpening passes before pasting. The node outputs the combined image and its blend mask. It works with crop coordinates from OLM Drag Crop.

<img src="assets/paste_cropped_image_back.jpg" alt="Y7 Paste Cropped Image Back placing a refined crop into an original image" width="100%"/>

Image Collections, Captions, and Files

Y7 Image Batch Path loads images from a directory as two matching lists: image data and full file paths. It accepts JPG, JPEG, PNG, and WebP files. Set batch_size to 0 for all images or choose a smaller batch; start_from is a one-based starting position for resuming partway through a directory. Choose alphabetical sequential, reverse, or random order. Random ordering is re-evaluated on every run.

Y7 Caption Saver writes a caption beside its source image as a .txt file with the same filename stem, such as cat.jpg → cat.txt. Connect an image path from Image Batch Path and caption text from a vision-language-model node or any other STRING output. The source must be an existing JPG, JPEG, PNG, or WebP file; other paths are refused. Turn overwrite on to replace an existing caption, or leave it off to create numbered alternatives such as cat_01.txt. This is an output node with no downstream outputs.

Y7 Load Image (subfolders) works like ComfyUI’s Load Image node but also lists images in subfolders of the input directory. It outputs an image and a mask.

Y7 Save Image extends ComfyUI’s Save Image node with a sub_folder, counter and bit_depth options. Its save_or_preview switch lets you preview images on the node without writing them to the output folder, or switch to saving when you are ready to keep the result.

ComfyUI-Y7Nodes Models

ComfyUI-Y7Nodes is a node collection, not a model pack. The models below are compatibility information for particular nodes; you only need them when building a workflow that uses those nodes.

Y7 Prompt Enhancer (Native) supports the following generation-capable text encoders connected through CLIPLoader:

Encoder familySupported variants
Gemma 4E2B, E4B, 31B, and 12B unified
Gemma 312B, including the LTX-2 text encoder built on it
Qwen30.6B, 2B, 4B, and 8B
Qwen3.50.8B, 2B, 4B, 9B, and 27B
Qwen3-VL4B and 8B

T5, UMT5, CLIP-L, CLIP-G, Gemma 2, and LLaMA-3.1 are not supported by this prompt-enhancement node because they do not provide the text-generation path it needs. For this node, use supported safetensors text encoders in ComfyUI’s models/text_encoders/ directory; GGUF is not supported. The author links Gemma 4 text-encoder weights as one source. For Gemma 4, the model is detected from its weights rather than the CLIPLoader type selection.

Y7 Flux.2 Klein Edit Multi-Ref, Y7 Flux.2 Sampler, and Y7 Flux.2 Klein Upscaler (Tiled) are workflow nodes for their named model families. The multi-reference edit node works with the documented flux.2-klein base and distilled variants, including 4B and 8B text-encoder variants. A distilled Klein checkpoint commonly uses cfg of 1.0; the sampler’s defaults are set with that use in mind.

Y7 Krea 2 nodes are designed for Krea 2 Raw and Turbo sampling workflows. Krea 2 Raw Sampling Shift patches a Raw model’s sampling shift; the readme says Turbo does not need that patch. The two- and three-stage samplers can use different models at different stages, provided their sampling settings allow a compatible handoff.

For optional pre-enlargement in Y7 Flux.2 Klein Upscaler (Tiled), the author suggests clean, neutral ESRGAN-style upscalers such as 4xRealWebPhoto_v4_dat2, 4xNomosUniDAT_otf, or RealESRGAN_x4plus. Without an upscale model, the node uses bicubic enlargement before refining tiles. This optional upscaler is separate from the Klein model doing the tile repainting.

ComfyUI-Y7Nodes Specialized Workflows

Flux.2 Klein Multi-Reference Editing

Y7 Flux.2 Klein Edit Multi-Ref prepares an image for editing alongside up to seven additional visual references. Choose the image to edit in the node, optionally paint its mask in ComfyUI’s MaskEditor, and connect extra images to the sockets that appear as you add references. The edited image is reference 1; subsequent sockets are references 2 through 8.

Use the references as visual context, such as a character sheet, clothing reference, or product photograph. In your prompt, identify them by position and subject: “Have the man in Figure 1 wear the jacket from Figure 2.” These labels are ordinary prompt language, not special commands; try different clear wording if the model follows the wrong reference.

target_megapixels controls the size of the image being edited and therefore the output resolution. ref_megapixels resizes each additional reference independently but does not set the output size. More or larger references cost more processing and memory; reducing ref_megapixels is a useful first adjustment if a workflow is slow or runs out of VRAM. The node can crop inputs to multiples of 16 and expand, feather, or harden the edit mask. Its outputs include a ready-to-sample reference_latent, patched positive and negative conditioning, image and mask previews, and debug information. Connect debug to Y7 Show Anything to inspect what the node used.

The mask applies only to the image being edited, whether painted or supplied through external_mask. If you load an ordinary black-and-white file through Load Image (as Mask), select its red channel; selecting alpha can produce an empty mask. The author recommends leaving the downstream sampler’s denoise at 1.0 for this workflow. Mask feathering is most useful for a later pixel-space composite; small feather values have little effect after the mask is reduced to latent resolution.

Y7 Flux.2 Sampler combines the noise, sampler selection, Flux.2 schedule, guider, and advanced sampling steps into one node. Connect a model, positive and negative conditioning, and a latent, then pass its output to a VAE decode node. It calculates its schedule from the latent’s dimensions. Controls include seed, cfg, sampler_name, steps, and denoise. The defaults are cfg 1.0, euler, 4 steps, and denoise 1.0; adjust them for the checkpoint and result you want. At cfg 1.0, the guider ignores negative conditioning.

Y7 Flux.2 Klein Upscaler (Tiled) enlarges and repaints an image one tile at a time. Each tile receives surrounding context, and neighboring tiles are blended together. Set scale_factor for the enlargement and tile_size for the approximate tile size; tile size, rather than final canvas size, is the important peak-memory control described by the author. Lower it if you run out of memory. Increase overlap when features such as horizons cross tile boundaries awkwardly.

You can also set scale_factor to 1.0 for a refine pass without enlargement. For that use, the author suggests leaving upscale_model disconnected and trying refine_strength around 0.85–0.92. refine_strength restrains changes during sampling; color_match helps prevent neighboring tiles from drifting apart in tone. Use a short, image-wide positive description because it is applied to every tile. The node outputs the finished image, a corresponding latent, and a report about the tile grid and blending. It was ported from ComfyUI_KleinTiledUpscaler, with the changes described in the author’s original documentation.

Krea 2 Multi-Stage Sampling

Y7 Krea 2 Raw Sampling Shift changes the sampling shift on a Krea 2 Raw model. In raw_dynamic mode, it uses the supplied width and height to choose a resolution-dependent shift; manual mode uses manual_shift. Apply it to the Raw model where your workflow calls for it, rather than automatically applying it to Turbo.

Y7 Krea 2 Two-Stage Sampler starts with one model and finishes with another. handoff_percent controls when the change happens: at 0%, only stage 2 runs; at 100%, only stage 1 runs. Each stage has its own step count, CFG, sampler, and scheduler. You can optionally resize the latent at the handoff using final_width and final_height. Leaving both at 0 keeps the original size. Optional stage-2 conditioning lets you use a different prompt for the finish; otherwise it reuses the main conditioning. The result is a latent ready for VAE decoding.

Y7 Krea 2 Three-Stage Sampler adds a final pass that reuses stage 1’s model and settings. It can place a faster cfg-1 stage in the middle while retaining stage 1’s settings at the beginning and end. stage3_handoff_percent determines where that final pass starts. It must be at or after the first handoff_percent; setting it to 100% skips stage 3. If two handoffs round to the same sampling step, move them farther apart.

For either sampler, the stage models need compatible model-sampling settings. If a handoff fails because its sigma is outside the next stage’s schedule, check the models’ shift settings.

Troubleshooting ComfyUI-Y7Nodes

A prompt enhancer returns an empty enhanced prompt

  1. Connect thinking_output to Y7 Show Anything to see whether the encoder spent its output on reasoning.
  2. Raise max_length to allow room for both reasoning and the final prompt, or lower temperature.
  3. Check that clip comes from a supported, generation-capable text encoder rather than a CLIP or T5 encoder.

A prompt enhancer says the encoder is unsupported or a GGUF model will not load

  1. Compare the encoder family with the compatibility table above.
  2. For this node, use a supported safetensors encoder through CLIPLoader, with its file in models/text_encoders/.
  3. Do not substitute a GGUF file for the documented safetensors format.

A Klein edit changes nothing, changes too little, or uses the wrong reference

  1. Check preview_image, preview_mask, and debug from Y7 Flux.2 Klein Edit Multi-Ref. Connect debug to Y7 Show Anything for a readable report.
  2. Confirm the mask marks the intended edit area. For a black-and-white external mask loaded with Load Image (as Mask), use the red channel.
  3. Keep the sampler’s denoise at 1.0 as the author recommends for this node.
  4. Identify references clearly by position and noun in the prompt, such as “the jacket in Figure 2.”

A tiled upscale runs out of memory or shows inconsistent tile boundaries

  1. Reduce tile_size to lower peak memory use.
  2. If multiple references or other workflow components also consume memory, reduce their image-size settings where appropriate.
  3. If a horizon or other continuous feature breaks at tile edges, increase overlap.
  4. Keep positive focused on the entire picture, rather than naming a detail that should appear in only one tile.

A crop looks stretched after pasting

  1. Check the region defined by left, top, right, and bottom. Remember that right and bottom are offsets inward from those edges.
  2. Compare that region’s shape with the edited crop’s shape.
  3. Make the crop and paste region the same aspect ratio before using Y7 Paste Cropped Image Back; the node resizes the crop to fit exactly.

A caption file is missing or has an unexpected name

  1. Confirm that Y7 Caption Saver receives both a caption STRING and a full image_path.
  2. Confirm the path refers to an existing JPG, JPEG, PNG, or WebP image.
  3. Check overwrite. When it is off and a caption already exists, the node saves a numbered filename instead of replacing the original.

Frequently Asked Questions

Do I need every model listed in this README?
No. You only need a compatible model for the specialized workflow you choose. Basic sizing, inspection, and image utility nodes do not require all of the listed model families.

Does Y7 Image Compare change my image?
No. It is a preview-only node with no output sockets.

Does color-match masking mean “correct the white area”?
Not in Y7 Color Match (Masked). White marks an area to exclude from the color calculation and correction. Always check what a mask means for the specific node using it.

Why does a megapixel-based selector produce slightly different dimensions than expected?
The selector calculates dimensions for the target area, then rounds them to the requested multiple. Rounding can change the exact pixel total.

Can I use Y7 Text as a shared prompt?
Yes. Its STRING output can supply the same text to multiple connected nodes.

Learn More about ComfyUI-Y7Nodes

ComfyUI-Y7Nodes Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ComfyUI-Y7Nodes detailed guide | ComfyUI