Closed Jannchie closed 8 months ago
Cc: @asfiyab-nvidia, the original contributor of the pipeline.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
I am having the same issue.
I am having the same issue.
I just faced the same problem. Reverting back to a previous version (0.21.1) fixed the problem for me. It is something in between these two versions. Can't tell more than that...
I've resolved this issue on my end, and I'll submit a pull request for it later.
I seem to have had this problem with diffusers==0.27.2 but resolved it bumping back to 0.21.1
Could you provide reproducible code snippet for this?
@sayakpaul I'm getting this error when running:
python convert_original_stable_diffusion_to_diffusers.py --checkpoint_path <safetensors_file> --dump_path <output_dir> --from_safetensors --pipeline_class_name StableDiffusionXLControlNetInpaintPipeline --controlnet
Specifically, the --controlnet
flag is the culprit here.
I welcome you to open a new issue with a fully reproducible code snippet.
for some reason, I start having this issue too,
File "/home/anasrezklinux/anas_april/visual_story.py", line 354, in dream_booth_inference
pipe = StableDiffusionPipeline.from_pretrained(output_dir, safety_checker=True, torch_dtype=torch.float16,
File "/home/anasrezklinux/anas_april/venv/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1196, in from_pretrained
model = pipeline_class(**init_kwargs)
File "/home/anasrezklinux/anas_april/venv/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py", line 183, in __init__
self.register_modules(
File "/home/anasrezklinux/anas_april/venv/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 519, in register_modules
library = not_compiled_module.__module__.split(".")[0]
AttributeError: 'bool' object has no attribute '__module__'. Did you mean: '__mod__'?
when running
pipe = StableDiffusionPipeline.from_pretrained(output_dir, safety_checker=True, torch_dtype=torch.float16,
low_cpu_mem_usage=False, device_map=None).to("cuda")
I seem to have had this problem with diffusers==0.27.2 but resolved it bumping back to 0.21.1
This worked for me. pip uninstall diffusers pip install diffusers==0.21.1
Hello there, I was having the same problem when switching vom diffusers 0.21.1 to 0.27.1. The setup was very basic with the following model: SG161222/Realistic_Vision_V2.0
After some digging into the source code, I found that the module registration from the image_encoder in the diffusion pipeline caused the error. After commenting out the registration of the image encoder in the following source code:
` self.register_modules( vae=vae, text_encoder=text_encoder, tokenizer=tokenizer, unet=unet, scheduler=scheduler, safety_checker=safety_checker, feature_extractor=feature_extractor,
)
`
in the init-method of the StableDiffusionPipeline on line 249, it works for me with diffusers 0.27.1. I think it has to do with the added image processor (ip)/additional image conditioning support added after 0.21.1. Maybe the image encoder is not defined in older pipelines, causing this wierd error. I may be wrong though... Also, I haven't found a nice solution yet without modifying the source code of diffusers.
tag
Describe the bug
not_compiled_module
could returnbool
. This causes this example to report an error:https://github.com/huggingface/diffusers/blob/main/examples/community/README.md?rgh-link-date=2023-12-25T13%3A48%3A18Z#tensorrt-image2image-stable-diffusion-pipeline
Reproduction
https://github.com/huggingface/diffusers/blob/main/examples/community/README.md?rgh-link-date=2023-12-25T13%3A48%3A18Z#tensorrt-image2image-stable-diffusion-pipeline
Logs
diffusers
version: 0.24.0Who can help?
No response