Compare commits

...

6 Commits

Author SHA1 Message Date
AIGC_Zero
5002bff1ee
Merge 2bf3807408 into c4a14df9a3 2026-01-21 01:36:55 +00:00
AIGCZero
2bf3807408 Merge master into feature/qwen-image-edit-node
Resolved conflict in comfy_extras/nodes_qwen.py by keeping the alpha channel fix:
- Retained the fix: images_vl.append(s.movedim(1, -1)[:, :, :, :3])
- This ensures only RGB channels are used for vision processing
- Fixes RuntimeError when processing images with alpha channels
2025-09-25 14:24:13 +08:00
AIGCZero
ffad732482 Fix alpha channel handling in Qwen image edit nodes
- Fix TextEncodeQwenImageEditPlus to ensure only RGB channels are used
- Prevents RuntimeError when input images have alpha channels
- Ensures proper tensor shape for vision language models
2025-09-25 13:33:35 +08:00
AIGCZero
2debbcf50e Remove Chinese comments from Qwen image edit node 2025-09-15 14:00:33 +08:00
AIGCZero
cc1c5da4f6 Add intelligent scaling algorithm selection for Qwen image edit node
- Implement automatic algorithm selection: area for downscaling, lanczos for upscaling
- Improve image quality by choosing optimal scaling method based on target size
- Add Chinese comments for better code documentation
- Ensure 8-pixel alignment for better compatibility with diffusion models
2025-09-15 13:53:09 +08:00
AIGCZero
c8bfec86b3 Add TextEncodeQwenImageEdit node with intelligent scaling
- Implements Qwen image editing functionality with CLIP text encoding
- Features intelligent scaling algorithm selection:
  - Uses 'area' method for downscaling to preserve details
  - Uses 'lanczos' method for upscaling for better quality
- Supports optional VAE encoding for reference latents
- Maintains aspect ratio with 'disabled' crop method
- Scales images to target resolution (1024x1024 pixels) with 8-pixel alignment
2025-09-15 13:50:49 +08:00

View File

@ -87,7 +87,7 @@ class TextEncodeQwenImageEditPlus(io.ComfyNode):
height = round(samples.shape[2] * scale_by)
s = comfy.utils.common_upscale(samples, width, height, "area", "disabled")
images_vl.append(s.movedim(1, -1))
images_vl.append(s.movedim(1, -1)[:, :, :, :3])
if vae is not None:
total = int(1024 * 1024)
scale_by = math.sqrt(total / (samples.shape[3] * samples.shape[2]))