Skip to content

[Bug] Qwen-image-edit didn't work with multiple latent_image #558

Description

@hubentu

Checklist

Describe the Bug

Current nunchaku works great for qwen-image-edit with one latent_image as input. HoweverWhen multiple latent images were provided for laten_image of ksampler (for example, Repeat Laten Batch node from comfy_core), it gave this error:

!!! Exception during processing !!! view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.
Traceback (most recent call last):
...
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

Environment

Ubuntu 24.04.2 LTS
python 3.12.3
pytorch version: 2.8.0
cuda 13.0
Nunchaku version: 1.0.0.dev20250823
ComfyUI-nunchaku version: 1.0.0dev1

Reproduction Steps

Add "Repeat Latent Batch" between VAE Encode and KSampler. Works with size of 1, but not work with size > 1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions