Skip to main content

Overview

This node encodes an edit instruction (prompt) along with one or more reference images for the Mage-Flow-Edit model. It resizes all reference images to the target output resolution, encodes them into latent space if a VAE is provided, and attaches the reference latents to the conditioning output. A blank latent tensor with the correct dimensions for sampling is also generated, ensuring the size always matches the output width and height.

Inputs

Notes on parameter dependencies:
  • If width and/or height are 0 and no reference images are provided, they fall back to 1024 each.
  • If only one of width or height is 0, the missing dimension is taken from the first reference image while the explicitly set dimension is kept.
  • The vae parameter is optional; reference latents are only generated and attached to conditioning when a VAE is connected.
  • The negative_prompt field is optional – if left empty, a single space is used internally as the negative text.
  • For the text conditioning, each reference image is resized so its longest edge is at most 384 pixels, matching training preprocessing. The VAE encoding branch instead resizes all references to the full output resolution.

Outputs

This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): 880d8856b7f6e656bc68ca953fbf892898d05bc5d65290ae3bf7a4405ee09be3