Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<class 'src.pipeline_stable_diffusion_ait.StableDiffusionAITPipeline'> is incorrectly implemented. Expected {'feature_extractor', 'scheduler', 'tokenizer', 'text_encoder', 'safety_checker', 'unet', 'vae'} to be defined #975

Open
jiagaoxiang opened this issue Dec 8, 2023 · 4 comments

Comments

@jiagaoxiang
Copy link

Run this line of code:
python3 scripts/demo.py --prompt "Mountain Rainier in van Gogh's world"

Got the following errors:

[20:11:19] model_container.cpp:87: Init AITemplate Runtime with 1 concurrency
Traceback (most recent call last):
File "/home/aac/AITemplate/examples/05_stable_diffusion/scripts/demo.py", line 66, in
run()
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/aac/AITemplate/examples/05_stable_diffusion/scripts/demo.py", line 51, in run
).to("cuda")
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 832, in to
module_is_sequentially_offloaded(module) for _, module in self.components.items()
File "/opt/conda/envs/py_3.10/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1954, in components
raise ValueError(
ValueError: StableDiffusionAITPipeline {
"_class_name": "StableDiffusionAITPipeline",
"_diffusers_version": "0.24.0",
"_name_or_path": "./tmp/diffusers-pipeline/stabilityai/stable-diffusion-v2",
"feature_extractor": [
"transformers",
"CLIPFeatureExtractor"
],
"image_encoder": [
null,
null
],
"requires_safety_checker": true,
"safety_checker": [
"stable_diffusion",
"StableDiffusionSafetyChecker"
],
"scheduler": [
"diffusers",
"EulerDiscreteScheduler"
],
"text_encoder": [
"transformers",
"CLIPTextModel"
],
"tokenizer": [
"transformers",
"CLIPTokenizer"
],
"unet": [
"diffusers",
"UNet2DConditionModel"
],
"vae": [
"diffusers",
"AutoencoderKL"
]
}
has been incorrectly initialized or <class 'src.pipeline_stable_diffusion_ait.StableDiffusionAITPipeline'> is incorrectly implemented. Expected {'feature_extractor', 'scheduler', 'tokenizer', 'text_encoder', 'safety_checker', 'unet', 'vae'} to be defined, but dict_keys(['vae', 'text_encoder', 'tokenizer', 'unet', 'scheduler', 'safety_checker', 'feature_extractor', 'image_encoder']) are defined.

@ipiszy
Copy link
Contributor

ipiszy commented Dec 14, 2023

Maybe worth checking whether the huggingface packages that you use are supported by AIT. AIT SD support hasn't been updated for a while. https://github.com/facebookincubator/AITemplate/tree/main/examples/05_stable_diffusion.

@jiagaoxiang
Copy link
Author

Maybe worth checking whether the huggingface packages that you use are supported by AIT. AIT SD support hasn't been updated for a while. https://github.com/facebookincubator/AITemplate/tree/main/examples/05_stable_diffusion.

I am strictly following the AIT tutorial on stable diffusion (on AMD ROCm). Has Meta stopped supporting AIT?

@fsx950223
Copy link
Contributor

Use this https://github.com/ROCmSoftwarePlatform/AITemplate instead.

@mkknightr
Copy link

I got a similar error :
And I Fix that by changing my diffusers' version from 0.29 to 0.11.0(which is the version of the official AITemplate repo's).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants