# What is the difference between StableDiffusionPipeline and DiffusionPipeline

**URL:** <https://discuss.huggingface.co/t/what-is-the-difference-between-stablediffusionpipeline-and-diffusionpipeline/66068>\
**Category:** 🧨 Diffusers\
**Created:** [December 16, 2023, 10:38pm UTC](https://discuss.huggingface.co/t/what-is-the-difference-between-stablediffusionpipeline-and-diffusionpipeline/66068 "2023-12-16T22:38:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CaffreyR](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@CaffreyR](https://discuss.huggingface.co/u/CaffreyR)\
**Post date:** [December 16, 2023, 10:38pm UTC](https://discuss.huggingface.co/t/what-is-the-difference-between-stablediffusionpipeline-and-diffusionpipeline/66068/1 "2023-12-16T22:38:42Z")

</div>

Hi guys, I would like to enquire that what is the difference between StableDiffusionPipeline and DiffusionPipeline. Can we loading stable diffusion weight using DiffusionPipeline, such as

pipeline = DiffusionPipeline.from\_pretrained(  
“runwayml/stable-diffusion-v1-5”  
)

Thanks

---

<div class="post-metadata">

**Author:** ![panigrah](https://avatars.discourse-cdn.com/v4/letter/p/bb73d2/32.png) [@panigrah](https://discuss.huggingface.co/u/panigrah)\
**Post date:** [December 18, 2023, 12:23am UTC](https://discuss.huggingface.co/t/what-is-the-difference-between-stablediffusionpipeline-and-diffusionpipeline/66068/2 "2023-12-18T00:23:14Z")

</div>

DiffusionPipeline is a generic class that can be extended for specific tasks. StableDiffusionPipeline inherits and extends the DiffusionPipeline class specifically for text-2-image tasks.

You can call ` DiffusionPipeline.from_pretrained` which will recognize and load a `StableDiffusionPipeline` based on the model that is passed to it. Or you can call `StableDiffusionPipeline.from_pretrained` directly also.

---

<div class="post-metadata">

**Author:** ![CaffreyR](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@CaffreyR](https://discuss.huggingface.co/u/CaffreyR)\
**Post date:** [December 18, 2023, 2:45am UTC](https://discuss.huggingface.co/t/what-is-the-difference-between-stablediffusionpipeline-and-diffusionpipeline/66068/3 "2023-12-18T02:45:21Z")

</div>

Thanks for your kind reply. So basically they will go to the same `file.py` in diffusers. The DiffusionPipeline finds the StableDiffusionPipeline class in the `src` dir automatically right?
