Describe the bug
This bug should have been fixed, yet it still occurs in the latest version.
It does not trigger when clip_skip is set to None, but the issue appears whenever clip_skip has a non-None value.
Reproduction
pipe = StableDiffusionPipeline.from_single_file(
pretrained_model_link_or_path=model_path,
torch_dtype=torch.float16 if device.type == "cuda" else torch.float32,
use_safetensors=True,
)
results = pipeline(
prompt=[prompt] * batch,
negative_prompt=[negative_prompt] * batch,
height=height,
width=width,
num_inference_steps=steps,
guidance_scale=guidance_scale,
generator=generators,
clip_skip=clip_skip
)
Logs
- error log
File "D:\Python\python_3_14\Lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 962, in __call__
prompt_embeds, negative_prompt_embeds = self.encode_prompt(
~~~~~~~~~~~~~~~~~~^
prompt,
^^^^^^^
...<7 lines>...
clip_skip=self.clip_skip,
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "D:\Python\python_3_14\Lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 437, in encode_prompt
prompt_embeds = self.text_encoder.text_model.final_layer_norm(prompt_embeds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python\python_3_14\Lib\site-packages\torch\nn\modules\module.py", line 1965, in __getattr__
raise AttributeError(
f"'{type(self).__name__}' object has no attribute '{name}'"
)
AttributeError: 'CLIPTextModel' object has no attribute 'text_model'
System Info
diffusers 0.39.0
transformers 5.13.0
Who can help?
No response
Describe the bug
This bug should have been fixed, yet it still occurs in the latest version.
It does not trigger when
clip_skipis set to None, but the issue appears wheneverclip_skiphas a non-None value.Reproduction
Logs
System Info
Who can help?
No response