File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,11 @@ def _get_submodels_for_export_diffusion(
139
139
# https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py#L571
140
140
unet .config .requires_aesthetics_score = getattr (pipeline .config , "requires_aesthetics_score" , False )
141
141
unet .config .time_cond_proj_dim = getattr (pipeline .unet .config , "time_cond_proj_dim" , None )
142
- unet .config .text_encoder_projection_dim = pipeline .text_encoder .config .projection_dim
142
+ unet .config .text_encoder_projection_dim = (
143
+ pipeline .text_encoder .config .projection_dim
144
+ if not is_sdxl
145
+ else pipeline .text_encoder_2 .config .projection_dim
146
+ )
143
147
unet .config .export_model_type = _get_diffusers_submodel_type (unet )
144
148
models_for_export ["unet" ] = unet
145
149
You can’t perform that action at this time.
0 commit comments