Skip to content

WanVACEPipeline does not work with low-noise stage only #12410

@vladmandic

Description

@vladmandic

Describe the bug

WanVACEPipeline has unnecessary/unsafe access to high-noise transformer module of the model which invalidates the ability to use low-noise stage only that was introduced in #12024

base = self.vae_scale_factor_spatial * self.transformer.config.patch_size[1]

fix is trivial, gather transformer.config.patch_size[1] from either either transformer or transformer_2, whichever is available.

Reproduction

load WanVACEPipeline with low-noise stage only transformer_2 and keep high-noise stage transformer as None.

Logs

│C:\ai\sdnext\venv\Lib\site-packages\diffusers\pipelines\wan\pipeline_wan_vace.py:339 in check_inputs                  │
│                                                                                                                      │
│   338 │   ):                                                                                                         │
│❱  339 │   │   base = self.vae_scale_factor_spatial * self.transformer.config.patch_size[1]                           │
│   340 │   │   if height % base != 0 or width % base != 0:                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'NoneType' object has no attribute 'config'

System Info

diffusers main branch

Who can help?

@yiyixuxu @sayakpaul @DN6

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions