Repository: huggingface/diffusers

Issue:
Composable Diffusion Pipeline Broken
### Describe the bug

Composable Diffusion Pipeline appears to be broken when attempting to follow the instructions here:

https://github.com/huggingface/diffusers/blob/268ebcb015d8816257f24e3cd930fb48964314b4/examples/community/README.md#composable-stable-diffusion

### Reproduction

import torch as th
import numpy as np
import torchvision.utils as tvu

from diffusers import DiffusionPipeline

model_path="runwayml/stable-diffusion-v1-5"

device = 'cuda'

prompt = "hello world"
scale = 7.5
steps = 15

pipe = DiffusionPipeline.from_pretrained(
    model_path,
    custom_pipeline="composable_stable_diffusion",
).to(device)

pipe.safety_checker = None

### Logs

```shell
─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\Users\Nagol\AppData\Local\Temp\ipykernel_9964\2813658613.py:15 in <module>                    │
│                                                                                                  │
│ [Errno 2] No such file or directory:                                                             │
│ 'C:\\Users\\Nagol\\AppData\\Local\\Temp\\ipykernel_9964\\2813658613.py'                          │
│                                                                                                  │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\pipelines\pip │
│ eline_utils.py:800 in from_pretrained                                                            │
│                                                                                                  │
│    797 │   │   │   else:                                                                         │
│    798 │   │   │   │   file_name = CUSTOM_PIPELINE_FILE_NAME                                     │
│    799 │   │   │                                                                                 │
│ ❱  800 │   │   │   pipeline_class = get_class_from_dynamic_module(                               │
│    801 │   │   │   │   custom_pipeline, module_file=file_name, cache_dir=cache_dir, revision=cu  │
│    802 │   │   │   )                                                                             │
│    803 │   │   elif cls != DiffusionPipeline:                                                    │
│                                                                                                  │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\dynamic │
│ _modules_utils.py:445 in get_class_from_dynamic_module                                           │
│                                                                                                  │
│   442 │   cls = get_class_from_dynamic_module("sgugger/my-bert-model", "modeling.py", "MyBertM   │
│   443 │   """                                                                                 │
│   444 │   # And lastly we get the class inside our newly created module                          │
│ ❱ 445 │   final_module = get_cached_module_file(                                                 │
│   446 │   │   pretrained_model_name_or_path,                                                     │
│   447 │   │   module_file,                                                                       │
│   448 │   │   cache_dir=cache_dir,                                                               │
│                                                                                                  │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\site-packages\diffusers\utils\dynamic │
│ _modules_utils.py:331 in get_cached_module_file                                                  │
│                                                                                                  │
│   328 │   │   shutil.copy(resolved_module_file, submodule_path / module_file)                    │
│   329 │   │   for module_needed in modules_needed:                                               │
│   330 │   │   │   module_needed = f"{module_needed}.py"                                          │
│ ❱ 331 │   │   │   shutil.copy(os.path.join(pretrained_model_name_or_path, module_needed), subm   │
│   332 │   else:                                                                                  │
│   333 │   │   # Get the commit hash                                                              │
│   334 │   │   # TODO: we will get this info in the etag soon, so retrieve it from there and no   │
│                                                                                                  │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\shutil.py:417 in copy                 │
│                                                                                                  │
│    414 │   """                                                                                   │
│    415 │   if os.path.isdir(dst):                                                                │
│    416 │   │   dst = os.path.join(dst, os.path.basename(src))                                    │
│ ❱  417 │   copyfile(src, dst, follow_symlinks=follow_symlinks)                                   │
│    418 │   copymode(src, dst, follow_symlinks=follow_symlinks)                                   │
│    419 │   return dst                                                                            │
│    420                                                                                           │
│                                                                                                  │
│ C:\Users\Nagol\AppData\Local\Programs\Python\Python310\lib\shutil.py:254 in copyfile             │
│                                                                                                  │
│    251 │   if not follow_symlinks and _islink(src):                                              │
│    252 │   │   os.symlink(os.readlink(src), dst)                                                 │
│    253 │   else:                                                                                 │
│ ❱  254 │   │   with open(src, 'rb') as fsrc:                                                     │
│    255 │   │   │   try:                                                                          │
│    256 │   │   │   │   with open(dst, 'wb') as fdst:                                             │
│    257 │   │   │   │   │   # macOS                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
FileNotFoundError: [Errno 2] No such file or directory: 'composable_stable_diffusion\\safety_checker.py'
```


### System Info

ipython notebook 

PS E:\img> python --version
Python 3.10.6

diffusers                0.15.0.dev0 (installed latest from github)




Discussion:
@MarkRich could you check here maybe? 

Resolving patch:
diff --git a/examples/community/composable_stable_diffusion.py b/examples/community/composable_stable_diffusion.py
--- a/examples/community/composable_stable_diffusion.py
+++ b/examples/community/composable_stable_diffusion.py
@@ -30,11 +30,10 @@
     LMSDiscreteScheduler,
     PNDMScheduler,
 )
-from diffusers.utils import is_accelerate_available
+from diffusers.utils import is_accelerate_available, deprecate, logging
 
-from ...utils import deprecate, logging
-from . import StableDiffusionPipelineOutput
-from .safety_checker import StableDiffusionSafetyChecker
+from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion import StableDiffusionPipelineOutput
+from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
 
 
 logger = logging.get_logger(__name__)  # pylint: disable=invalid-name
@@ -580,3 +579,4 @@ def __call__(
             return (image, has_nsfw_concept)
 
         return StableDiffusionPipelineOutput(images=image, nsfw_content_detected=has_nsfw_concept)
+        


Test patch: