Qwen-Image 2.1 Turbo: VAE tiling introduces vertical streaks at 2048x2048 on NVIDIA/CUDA
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, machine-learning
Hướng nghiên cứu
Start by reading QwenImage21Pipeline and the VAE tiling implementation; the report provides a complete reproduce.py script and fixed model revision to compare tiled and untiled decoding at 2048×2048 on CUDA. Reproduce the vertical streaks with the specified 256×256 tiles and 192×192 stride, then trace where tiled decoding differs. Done means tiled output no longer shows conspicuous structured streaks while preserving memory-saving decoding.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
QwenImage21Pipeline produces visible colored vertical streaks in the sky when VAE tiling is enabled. With tiling disabled, the same prompt and seed produce a reference image without these streaks.
The case is a 2048x2048 moonlit pixel-art garden generated with Qwen/Qwen-Image-2.1-Turbo, 8 inference steps and seed 42. Both runs execute sequentially on an NVIDIA H20 using unmodified diffusers and the same RGBA postprocessing. No prompt enhancement is used, and no Python exception is raised.
Comparison
| Tiling disabled | Tiling enabled: 256x256 tiles, 192x192 stride |
|---|---|
Expected: memory-saving decoding without conspicuous structured streaks. Small numerical differences between tiled and untiled decoding are understandable.
Actual: repeated colored vertical streaks appear in the dark sky in the tiled image. Both images are direct pipeline PNG exports.
Generation case
Only the prompt, dimensions, inference step count and seed are needed to run this case. The other pipeline options use their defaults. The model revision and VAE tile size/stride are fixed explicitly in the script.
Original prompt and generation parameters
{
"prompt": "A moonlit fantasy garden scene at night fills the frame in a highly detailed pixel-art style. The upper portion shows a deep navy-to-deep-blue sky with a subtle gradient, scattered with many small square stars in white, pale yellow, and icy blue. Soft, blocky clouds stretch across the left and right horizon areas, rendered with layered blue and gray pixels that create a gentle atmospheric depth. In the upper-right quadrant, a very large full moon dominates the sky, occupying roughly a quarter of the image width. It is circular, warm ivory and pale gold in color, with visible crater-like mottling, darker gray-brown maria, and a glowing halo of bright light around its edge. The moonlight casts a cool, silvery illumination over the entire scene.\n\nBelow the sky, the landscape opens into a distant valley. On the right side near the horizon, dark blue mountain silhouettes rise in layered ridges, with a small castle or town visible at their base. The castle-like structure has narrow vertical towers and pointed rooftops, glowing with tiny warm yellow-orange window lights that contrast with the surrounding blue night. Farther left, darker tree shapes and a fence line appear along the edge of the field, adding depth and rural context to the setting.\n\nThe central subject is a single adult feminine humanoid figure with blue skin and long flowing blue hair, shown in full-body view and viewed from a slightly low angle as if standing among tall flowers. She is positioned slightly left of center, dancing with one leg lifted and her broad skirt sweeping dramatically to the lower right. Her posture is graceful and balletic: one arm extends outward toward the lower-left side with relaxed fingers, while the other arm reaches upward toward the moonlit sky with a delicate open hand. Her expression is calm and serene, with closed or softly lowered eyes, defined brows, blue-toned facial features, and a faint composed smile. Her face is stylized rather than realistic, with smooth blue skin, delicate makeup-like shading, and luminous highlights from the moonlight.\n\nHer hair is very long, voluminous, and wavy, colored in deep cobalt, royal blue, and cyan highlights, cascading behind her shoulders and moving as if caught by wind. She wears ornate silver hair accessories on the right side of her head, including floral or branch-like metallic ornaments, dangling strands, and a star-shaped earring. Additional silver jewelry appears at her neck and waist, including delicate chains and pendant-like details. Her clothing is an elaborate white gown with a fitted bodice, off-shoulder sleeves, ruffled trim, lace-like edges, and a large layered skirt. The fabric is semi-translucent in places, with soft folds, cool blue shadows, bright white highlights, and silver embroidery or sparkling accents. The skirt spreads widely across the lower-right half of the image, forming sweeping arcs of fabric that overlap the flowers and catch bright moonlit highlights along the outer edges. Her visible hands and arms are slender, blue-skinned, and decorated with fine silver bracelets and arm jewelry.\n\nThe foreground is filled with dense white roses and dark green foliage. Large rose blossoms occupy the lower-left, lower-center, and lower-right areas, with additional smaller blooms and buds scattered throughout the field. The roses have cream-white petals with pale gray and blue shadowing, yellow centers, and crisp pixelated petal edges. Their leaves are dark green, blue-green, and almost black in the shadows, with stems and grass rising between them. The nearest flowers are larger and more detailed, creating a strong sense of depth, while more distant blossoms blend into the blue field. The color palette is dominated by cool blues, silvers, whites, and deep greens, punctuated by warm moonlight and tiny golden lights in the distant settlement.\n\nThe image is composed like a cinematic fantasy illustration, with the dancer as the central focal point, the oversized moon acting as a dramatic secondary focal point, and the rose field framing the lower edge. The pixel-art rendering uses visible square blocks, crisp outlines, and carefully arranged light and shadow rather than smooth painterly gradients. The overall mood is dreamlike, romantic, magical, and nocturnal, combining a celestial garden setting with an ethereal dancing figure under radiant moonlight.",
"width": 2048,
"height": 2048,
"num_inference_steps": 8,
"seed": 42
}
Reproduction
Save the complete code below as reproduce.py, then run:
pip install "git+https://github.com/huggingface/diffusers.git@e04f0c5f24392fcd34b32d18d0ce03668f9bcd50"
python reproduce.py
The prompt is embedded in the script. It calls the official pipeline twice, resetting the CUDA generator to seed 42 for each run, and saves comparison/untiled.png and comparison/tiled.png. Model CPU offload is enabled for both runs. No additional input file is needed.
Complete reproduction script
import argparse
from pathlib import Path
import torch
from diffusers import QwenImage21Pipeline
PROMPT = (
"A moonlit fantasy garden scene at night fills the frame in a highly detailed pixel-art style. "
"The upper portion shows a deep navy-to-deep-blue sky with a subtle gradient, scattered with many"
" small square stars in white, pale yellow, and icy blue. Soft, blocky clouds stretch across the "
"left and right horizon areas, rendered with layered blue and gray pixels that create a gentle "
"atmospheric depth. In the upper-right quadrant, a very large full moon dominates the sky, "
"occupying roughly a quarter of the image width. It is circular, warm ivory and pale gold in "
"color, with visible crater-like mottling, darker gray-brown maria, and a glowing halo of bright "
"light around its edge. The moonlight casts a cool, silvery illumination over the entire scene.\n\n"
"Below the sky, the landscape opens into a distant valley. On the right side near the horizon, "
"dark blue mountain silhouettes rise in layered ridges, with a small castle or town visible at "
"their base. The castle-like structure has narrow vertical towers and pointed rooftops, glowing "
"with tiny warm yellow-orange window lights that contrast with the surrounding blue night. "
"Farther left, darker tree shapes and a fence line appear along the edge of the field, adding "
"depth and rural context to the setting.\n\nThe central subject is a single adult feminine humanoid"
" figure with blue skin and long flowing blue hair, shown in full-body view and viewed from a "
"slightly low angle as if standing among tall flowers. She is positioned slightly left of center,"
" dancing with one leg lifted and her broad skirt sweeping dramatically to the lower right. Her "
"posture is graceful and balletic: one arm extends outward toward the lower-left side with "
"relaxed fingers, while the other arm reaches upward toward the moonlit sky with a delicate open "
"hand. Her expression is calm and serene, with closed or softly lowered eyes, defined brows, "
"blue-toned facial features, and a faint composed smile. Her face is stylized rather than "
"realistic, with smooth blue skin, delicate makeup-like shading, and luminous highlights from the"
" moonlight.\n\nHer hair is very long, voluminous, and wavy, colored in deep cobalt, royal blue, "
"and cyan highlights, cascading behind her shoulders and moving as if caught by wind. She wears "
"ornate silver hair accessories on the right side of her head, including floral or branch-like "
"metallic ornaments, dangling strands, and a star-shaped earring. Additional silver jewelry "
"appears at her neck and waist, including delicate chains and pendant-like details. Her clothing "
"is an elaborate white gown with a fitted bodice, off-shoulder sleeves, ruffled trim, lace-like "
"edges, and a large layered skirt. The fabric is semi-translucent in places, with soft folds, "
"cool blue shadows, bright white highlights, and silver embroidery or sparkling accents. The "
"skirt spreads widely across the lower-right half of the image, forming sweeping arcs of fabric "
"that overlap the flowers and catch bright moonlit highlights along the outer edges. Her visible "
"hands and arms are slender, blue-skinned, and decorated with fine silver bracelets and arm "
"jewelry.\n\nThe foreground is filled with dense white roses and dark green foliage. Large rose "
"blossoms occupy the lower-left, lower-center, and lower-right areas, with additional smaller "
"blooms and buds scattered throughout the field. The roses have cream-white petals with pale gray"
" and blue shadowing, yellow centers, and crisp pixelated petal edges. Their leaves are dark "
"green, blue-green, and almost black in the shadows, with stems and grass rising between them. "
"The nearest flowers are larger and more detailed, creating a strong sense of depth, while more "
"distant blossoms blend into the blue field. The color palette is dominated by cool blues, "
"silvers, whites, and deep greens, punctuated by warm moonlight and tiny golden lights in the "
"distant settlement.\n\nThe image is composed like a cinematic fantasy illustration, with the "
"dancer as the central focal point, the oversized moon acting as a dramatic secondary focal "
"point, and the rose field framing the lower edge. The pixel-art rendering uses visible square "
"blocks, crisp outlines, and carefully arranged light and shadow rather than smooth painterly "
"gradients. The overall mood is dreamlike, romantic, magical, and nocturnal, combining a "
"celestial garden setting with an ethereal dancing figure under radiant moonlight."
)
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--model", default="Qwen/Qwen-Image-2.1-Turbo")
parser.add_argument("--output", type=Path, default=Path("comparison"))
args = parser.parse_args()
args.output.mkdir(parents=True, exist_ok=True)
torch.set_num_threads(1)
pipe = QwenImage21Pipeline.from_pretrained(
args.model,
revision="fc13ba1986fcb905854dc8de2f52eee395f49b5b",
torch_dtype=torch.bfloat16,
)
pipe.enable_model_cpu_offload()
with torch.inference_mode():
for name, tiled in (("untiled", False), ("tiled", True)):
pipe.vae.disable_tiling()
if tiled:
# default value
pipe.vae.enable_tiling(
tile_sample_min_height=256,
tile_sample_min_width=256,
tile_sample_stride_height=192,
tile_sample_stride_width=192,
)
image = pipe(
prompt=PROMPT,
width=2048,
height=2048,
num_inference_steps=8,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
image.save(args.output / f"{name}.png")
print(f"Saved {args.output / (name + '.png')}", flush=True)
if __name__ == "__main__":
main()
Verification
The script above was run successfully on the environment below. The two pipeline outputs were compared after these prompt-based calls. Colored vertical streaks were visible with tiling enabled and absent from the untiled reference in this case.
Related reports
- #14928 reports similar VAE tiling artifacts on AMD/ROCm. This issue provides a separate NVIDIA/CUDA reproduction starting from a public model and the original text prompt. A shared root cause has not been established.
- #14866 discusses larger tile sizes as a mitigation for visible seams; its author closed it after finding that the seams could still appear.
System Info
- diffusers:
0.42.0.dev0, unmodified commite04f0c5f24392fcd34b32d18d0ce03668f9bcd50 - Python:
3.12.3 - PyTorch:
2.11.0+cu130 - Transformers:
5.8.1 - Accelerate:
1.14.0 - GPU: NVIDIA H20
- Platform: Linux x86_64
- Model dtype: BF16; single image; 2048x2048 RGBA output
- Both runs use
enable_model_cpu_offload(). - Model revision:
Qwen/Qwen-Image-2.1-Turbo@fc13ba1986fcb905854dc8de2f52eee395f49b5b
- Ngôn ngữ chính
- Python
- Star
- 34.9k
- Fork
- 7.5k
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 65
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của huggingface/diffusers
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
huggingface/diffusers#15363 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`ZImageImg2ImgPipeline` / `ZImageInpaintPipeline`: explicit height/width different from the input image raises RuntimeErrorCó thể đã có người làm @chessing234 đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
huggingface/diffusers#15337 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Multi-vector textual inversion uses only the first vector when the token has uppercase letters (transformers v5)Có thể đã có người làm @sunhouy đã nhận 2 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
huggingface/diffusers#15313 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TCDScheduler advances the generator on the final step of a strength-truncated custom scheduleCó thể đã có người làm @SIDDARTHAREDDY8 đã nhận 5 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
huggingface/diffusers#15288 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
unload_textual_inversion(token) leaves the extra tokens of a multi-vector embedding behind, so it can't be loaded againCó thể đã có người làm @sohailshk đã nhận 11 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
huggingface/diffusers#15211 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của huggingface/diffusers
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Unused loot bag group names left in dreamcraft en_US.langCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởStatus: Triage Suggestion
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
GTNewHorizons/GT-New-Horizons-Modpack#27789 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend sev-5
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
-
core good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
b4b code health next
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ESCOMP/CTSM#4330 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày