




# NOTE: This file is deprecated and will be removed in a future version.
# It only exists so that temporarely `from diffusers.pipelines import DiffusionPipeline` works
from ...utils import deprecate
from ..controlnet.multicontrolnet import MultiControlNetModel  # noqa: F401
from ..controlnet.pipeline_controlnet import StableDiffusionControlNetPipeline  # noqa: F401


deprecate(
    "stable diffusion controlnet",
    "0.22.0",
    "Importing `StableDiffusionControlNetPipeline` or `MultiControlNetModel` from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion_controlnet is deprecated. Please import `from diffusers import StableDiffusionControlNetPipeline` instead.",
    standard_warn=False,
    stacklevel=3,
)











import re

from filelock import FileLock


try:
   import nltk

   lowerCamelCase__ :   str					=							True
except (ImportError, ModuleNotFoundError):
   lowerCamelCase__ :   Union[str, Any]					=							False

if NLTK_AVAILABLE:
   with FileLock('.lock') as lock:
      nltk.download('punkt', quiet=True)

def 					UpperCAmelCase_							(      __UpperCAmelCase						:	str							)					-> str:
      re.sub('<n>'			,			''			,			__UpperCAmelCase							)  # remove pegasus newline char
      assert NLTK_AVAILABLE, "nltk must be installed to separate newlines between sentences. (pip install nltk)"
      return "\n".join(nltk.sent_tokenize(__UpperCAmelCase							)							)