Open Dango233 opened 1 year ago
just wondering what kind of custom models you are using?
I used a model trained under the CompVis/Stable-diffusion format. I got it converted to diffusers format using this conversion script:
Seems that the config saved using diffusers' save_pretrained
method will have this problem
Thanks! cool !
The from_pretrained_2d runs into
ValueError: unknown mid_block_type: UNetMidBlock2DCrossAttn
when"mid_block_type": "UNetMidBlock2DCrossAttn"
is specified in the config file of pertained unet.This happens with some custom models (model converters could be a cause) but won't happen with the official models.
This PR fixes the problem by allowing
UNetMidBlock2DCrossAttn
in the type check.