Skip to content

Runtime error with from_single_file #8435

@suzukimain

Description

@suzukimain

Describe the bug

Versioning diffusers to 0.29.0.dev0 did not solve the problem.

Reproduction

pip install diffusers
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_single_file("https://huggingface.co/gsdf/Counterfeit-V2.5/blob/main/Counterfeit-V2.5_fp16.safetensors")

Logs

/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in load_state_dict(self, state_dict, strict, assign)
   2187 
   2188         if len(error_msgs) > 0:
-> 2189             raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
   2190                                self.__class__.__name__, "\n\t".join(error_msgs)))
   2191         return _IncompatibleKeys(missing_keys, unexpected_keys)

RuntimeError: Error(s) in loading state_dict for CLIPTextModel:
	Unexpected key(s) in state_dict: "text_model.embeddings.position_ids".

System Info

  • 🤗 Diffusers version: 0.28.2
  • Platform: Ubuntu 22.04.3 LTS - Linux-6.1.85+-x86_64-with-glibc2.35
  • Running on a notebook?: No
  • Running on Google Colab?: No
  • Python version: 3.10.12
  • PyTorch version (GPU?): 2.3.0+cu121 (True)
  • Flax version (CPU?/GPU?/TPU?): 0.8.4 (gpu)
  • Jax version: 0.4.26
  • JaxLib version: 0.4.26
  • Huggingface_hub version: 0.23.2
  • Transformers version: 4.41.2
  • Accelerate version: not installed
  • PEFT version: not installed
  • Bitsandbytes version: not installed
  • Safetensors version: 0.4.3
  • xFormers version: not installed
  • Accelerator: Tesla T4, 15360 MiB VRAM
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions