AttributeError("'FrozenDict' object has no attribute 'block_out_channels'")

#3
by hasanmuzak - opened

Hello,

Using the example code with diffusers throws the following error:
AttributeError("'FrozenDict' object has no attribute 'block_out_channels'")

My logs:

`trust_remote_code` is enabled. Downloading code from fal/FLUX.2-Tiny-AutoEncoder. Please ensure you trust the contents of this repository
The config attributes {'auto_map': {'AutoModel': 'flux2_tiny_autoencoder.Flux2TinyAutoEncoder'}} were passed to Flux2TinyAutoEncoder, but are not expected and will be ignored. Please verify your config.json configuration file.
Loading pipeline components...:   0%|          | 0/5 [00:00<?, ?it/s]`torch_dtype` is deprecated! Use `dtype` instead!
Loading checkpoint shards: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 10/10 [00:13<00:00,  1.40s/it]
Loading checkpoint shards: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 10/10 [00:13<00:00,  1.28s/it]
Loading checkpoint shards: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 7/7 [00:15<00:00,  2.22s/it]
Loading pipeline components...: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5/5 [00:31<00:00,  6.28s/it]
Expected types for vae: (<class 'diffusers.models.autoencoders.autoencoder_kl_flux2.AutoencoderKLFlux2'>,), got <class 'diffusers_modules.local.fal--FLUX.2-Tiny-AutoEncoder.9f80e4d61494a5c1eda1ae17c861d8eab6950049.flux2_tiny_autoencoder.Flux2TinyAutoEncoder'>.
Traceback (most recent call last):
  File "/pkg/modal/_runtime/container_io_manager.py", line 905, in handle_user_exception
    yield
  File "/pkg/modal/_container_entrypoint.py", line 347, in call_lifecycle_functions
    res = func(*args)
  File "/root/flux2dev.py", line 56, in load_pipeline
    pipe = Flux2Pipeline.from_pretrained(
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        "black-forest-labs/FLUX.2-dev", vae=tiny_vae, torch_dtype=torch.bfloat16
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ).to("cuda")
    ^
  File "/usr/local/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1092, in from_pretrained
    model = pipeline_class(**init_kwargs)
  File "/usr/local/lib/python3.13/site-packages/diffusers/pipelines/flux2/pipeline_flux2.py", line 210, in __init__
    self.vae_scale_factor = 2 ** (len(self.vae.config.block_out_channels) - 1) if getattr(self, "vae", None) else 8
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'FrozenDict' object has no attribute 'block_out_channels'
Runner failed with exception: AttributeError("'FrozenDict' object has no attribute 'block_out_channels'")

Sign up or log in to comment