small note: why JoyImage text-encode nodes emit the bucketed image

Unlike TextEncodeQwenImageEdit, the JoyImage nodes resize to a discrete bucket,
so the target size can't be recomputed downstream. Keep the image output and
document that it feeds VAEEncode for a matching-size init latent.
This commit is contained in:
huangfeice 2026-07-06 16:58:50 +08:00
parent 0c18c501a7
commit b0eb165473

View File

@ -74,6 +74,8 @@ class TextEncodeJoyImageEdit(io.ComfyNode):
ref_latent = vae.encode(resized_image)
conditioning = node_helpers.conditioning_set_values(conditioning, {"reference_latents": [ref_latent]}, append=True)
# Return the bucketed image so VAEEncode can build a matching-size init latent;
# the bucket size isn't reproducible outside this node.
return io.NodeOutput(conditioning, resized_image)
@ -140,8 +142,8 @@ class TextEncodeJoyImageEditPlus(io.ComfyNode):
conditioning, {"reference_latents": ref_latents}, append=True,
)
# The last reference sets the target resolution; return it for VAEEncode and the
# matching negative encode.
# The last reference sets the target resolution; return it for VAEEncode
# since the bucket size isn't reproducible outside this node.
return io.NodeOutput(conditioning, resized_images[-1])