



from datetime import datetime

import matplotlib.pyplot as plt
import torch



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			for param in module.parameters():
						lowercase__   					=			False



def __lowerCAmelCase	(       ):
			lowercase__   					=			"cuda" if torch.cuda.is_available() else "cpu"
			if torch.backends.mps.is_available() and torch.backends.mps.is_built():
						lowercase__   					=			"mps"
			if device == "mps":
						print(
						    "WARNING: MPS currently doesn't seem to work, and messes up backpropagation without any visible torch"
						    " errors. I recommend using CUDA on a colab notebook or CPU instead if you're facing inexplicable issues"
						    " with generations."					)
			return device



def __lowerCAmelCase	(       SCREAMING_SNAKE_CASE_					):
			lowercase__   					=			plt.imshow(SCREAMING_SNAKE_CASE_					)
			fig.axes.get_xaxis().set_visible(SCREAMING_SNAKE_CASE_					)
			fig.axes.get_yaxis().set_visible(SCREAMING_SNAKE_CASE_					)
			plt.show()




def __lowerCAmelCase	(       ):
			lowercase__   					=			datetime.now()
			lowercase__   					=			current_time.strftime("%H:%M:%S"					)
			return timestamp









from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
							if not (is_transformers_available() and is_torch_available() and is_transformers_version(""">=""", """4.25.0""")):
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							from ...utils.dummy_torch_and_transformers_objects import (
							    VersatileDiffusionDualGuidedPipeline,
							    VersatileDiffusionImageVariationPipeline,
							    VersatileDiffusionPipeline,
							    VersatileDiffusionTextToImagePipeline,
							)
else:
							from .modeling_text_unet import UNetFlatConditionModel
							from .pipeline_versatile_diffusion import VersatileDiffusionPipeline
							from .pipeline_versatile_diffusion_dual_guided import VersatileDiffusionDualGuidedPipeline
							from .pipeline_versatile_diffusion_image_variation import VersatileDiffusionImageVariationPipeline
							from .pipeline_versatile_diffusion_text_to_image import VersatileDiffusionTextToImagePipeline




