Text-to-Image
Diffusers
Safetensors
StableDiffusionPipeline
stable-diffusion
Inference Endpoints

TypeError: unsupported operand type(s) for //: 'int' and 'list'

#29
by linkanjarad - opened

Running the example code on the model card gives an error:

      5 # Use the Euler scheduler here instead
      6 scheduler = EulerDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
----> 7 pipe = StableDiffusionPipeline.from_pretrained(model_id, scheduler=scheduler, revision="fp16", torch_dtype=torch.float16)
      8 pipe = pipe.to("cuda")

6 frames
/usr/local/lib/python3.8/dist-packages/diffusers/models/unet_2d_blocks.py in __init__(self, in_channels, out_channels, temb_channels, dropout, num_layers, resnet_eps, resnet_time_scale_shift, resnet_act_fn, resnet_groups, resnet_pre_norm, attn_num_head_channels, cross_attention_dim, attention_type, output_scale_factor, downsample_padding, add_downsample, dual_cross_attention)
    552                     Transformer2DModel(
    553                         attn_num_head_channels,
--> 554                         out_channels // attn_num_head_channels,
    555                         in_channels=out_channels,
    556                         num_layers=1,

TypeError: unsupported operand type(s) for //: 'int' and 'list'

No it is not fixed. I still get the error. And I don't have any idea how to solve it.

I'm facing the same issue as well with diffusers v0.2.2

Got the same error:
pip install diffusers transformers accelerate scipy safetensors --upgrade
solved it

Sign up or log in to comment