huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
25.03k stars 5.17k forks source link

scheduler文件无法识别 #8323

Open wx331406 opened 3 months ago

wx331406 commented 3 months ago

Describe the bug

发生异常: ValueError Pipeline <class 'diffusers.pipelines.latent_consistency_models.pipeline_latent_consistency_text2img.LatentConsistencyModelPipeline'> expected {'tokenizer', 'text_encoder', 'unet', 'vae', 'feature_extractor', 'safety_checker', 'scheduler'}, but only {'tokenizer', 'text_encoder', 'unet', 'vae', 'feature_extractor', 'safety_checker'} were passed. File "D:\local_gradio\app.py", line 25, in pipe = DiffusionPipeline.from_pretrained("LCM_Dreamshaper_v7_4k.safetensors") ValueError: Pipeline <class 'diffusers.pipelines.latent_consistency_models.pipeline_latent_consistency_text2img.LatentConsistencyModelPipeline'> expected {'tokenizer', 'text_encoder', 'unet', 'vae', 'feature_extractor', 'safety_checker', 'scheduler'}, but only {'tokenizer', 'text_encoder', 'unet', 'vae', 'feature_extractor', 'safety_checker'} were passed.

Reproduction

我非常确定文件是存在的,然而总是报错无法识别

Logs

日志五任何提示

System Info

(D:\conda_envs\lcm_env) D:>diffusers-cli env

Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.

Who can help?

莉莉娅

yiyixuxu commented 3 months ago

Can you provide a reproducible script? if this is what you used, can you try to use from_single_file instead?

pipe = DiffusionPipeline.from_pretrained("LCM_Dreamshaper_v7_4k.safetensors")
sayakpaul commented 3 months ago

And also, please prefer translating the issue to English so that other maintainers of the library can also comment if necessary.