lllyasviel / LayerDiffuse_DiffusersCLI

LayerDiffuse in pure diffusers without any GUI
Apache License 2.0
336 stars 25 forks source link

There are bug in diffusers with sdxl #7

Open Johnson-yue opened 4 months ago

Johnson-yue commented 4 months ago

software version :

diffusers == 0. 29.2

Bug1:

AttributeError: 'CLIPTextModelOutput' object has no attribute 'pooler_output'

Because text_encoder is CLIPTextModel , it output is transformers.modeling_outputs.BaseModelOutputWithPooling, so the output contain pooler_output .

But in text_encoder_2 is CLIPTextModelWithProjection, it output is transformers.models.clip.modeling_clip.CLIPTextModelOutput, it not have 'pooler_output' ,and in your code https://github.com/lllyasviel/LayerDiffuse_DiffusersCLI/blob/3061d9aed52a6c52a13fcf2b196c0fef4d727824/diffusers_kdiffusion_sdxl.py#L101, you try to get pooler_output in every text_encoder (both text_encoder and text_encoder_2), so it break!!