Skip to content

[community pipeline] SpeechToImage #5379

@stevhliu

Description

@stevhliu

Hi @MikailINTech, the copy-and-paste example from the Speech to image pipeline is failing to initialize correctly with the following error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-2-3d6478569897>](https://localhost:8080/#) in <cell line: 34>()
     32 
     33 diffuser_pipeline.enable_attention_slicing()
---> 34 diffuser_pipeline = diffuser_pipeline.to(device)
     35 
     36 output = diffuser_pipeline(speech_data)

1 frames
[/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py](https://localhost:8080/#) in components(self)
   1830 
   1831         if set(components.keys()) != expected_modules:
-> 1832             raise ValueError(
   1833                 f"{self} has been incorrectly initialized or {self.__class__} is incorrectly implemented. Expected"
   1834                 f" {expected_modules} to be defined, but {components.keys()} are defined."

ValueError: SpeechToImagePipeline {
  "_class_name": "SpeechToImagePipeline",
  "_diffusers_version": "0.22.0.dev0",
  "_name_or_path": "CompVis/stable-diffusion-v1-4",
  "feature_extractor": [
    "transformers",
    "CLIPImageProcessor"
  ],
  "scheduler": [
    "diffusers",
    "PNDMScheduler"
  ],
  "speech_model": [
    "transformers",
    "WhisperForConditionalGeneration"
  ],
  "speech_processor": [
    "transformers",
    "WhisperProcessor"
  ],
  "text_encoder": [
    "transformers",
    "CLIPTextModel"
  ],
  "tokenizer": [
    "transformers",
    "CLIPTokenizer"
  ],
  "unet": [
    "diffusers",
    "UNet2DConditionModel"
  ],
  "vae": [
    "diffusers",
    "AutoencoderKL"
  ]
}
 has been incorrectly initialized or <class 'diffusers_modules.git.speech_to_image_diffusion.SpeechToImagePipeline'> is incorrectly implemented. Expected {'feature_extractor', 'unet', 'vae', 'safety_checker', 'text_encoder', 'speech_model', 'scheduler', 'tokenizer', 'speech_processor'} to be defined, but dict_keys(['speech_model', 'speech_processor', 'vae', 'text_encoder', 'tokenizer', 'unet', 'scheduler', 'feature_extractor']) are defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues that haven't received updates

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions