






'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


UpperCamelCase							={
    "configuration_mgp_str": ["MGP_STR_PRETRAINED_CONFIG_ARCHIVE_MAP", "MgpstrConfig"],
    "processing_mgp_str": ["MgpstrProcessor"],
    "tokenization_mgp_str": ["MgpstrTokenizer"],
}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      UpperCamelCase							=[
          "MGP_STR_PRETRAINED_MODEL_ARCHIVE_LIST",
          "MgpstrModel",
          "MgpstrPreTrainedModel",
          "MgpstrForSceneTextRecognition",
      ]

if TYPE_CHECKING:
      from .configuration_mgp_str import MGP_STR_PRETRAINED_CONFIG_ARCHIVE_MAP, MgpstrConfig
      from .processing_mgp_str import MgpstrProcessor
      from .tokenization_mgp_str import MgpstrTokenizer

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_mgp_str import (
                MGP_STR_PRETRAINED_MODEL_ARCHIVE_LIST,
                MgpstrForSceneTextRecognition,
                MgpstrModel,
                MgpstrPreTrainedModel,
            )
else:
      import sys

      UpperCamelCase							=_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)














'''simple docstring'''

import torch

from diffusers import StableDiffusionPipeline


UpperCamelCase							="path-to-your-trained-model"
UpperCamelCase							=StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.floataa).to("cuda")

UpperCamelCase							="A photo of sks dog in a bucket"
UpperCamelCase							=pipe(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]

image.save("dog-bucket.png")






