
'''simple docstring'''

import pickle
import unittest

import torch

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu


@require_cpu
class  _UpperCAmelCase ( unittest.TestCase    ):

					"""simple docstring"""

					def 							_lowerCAmelCase  (      self ):

							'''simple docstring'''

							a_      :	str      =							torch.nn.Linear(10							,		10 )
							a_      :	Dict      =							torch.optim.SGD(model.parameters()							,		0.1 )
							a_      :	Dict      =							Accelerator()
							a_      :	Optional[int]      =							accelerator.prepare(_lowerCamelCase )
							try:
									pickle.loads(pickle.dumps(_lowerCamelCase ) )
							except Exception as e:
									self.fail(f'''Accelerated optimizer pickling failed with {e}''' )
							AcceleratorState._reset_state()




'''simple docstring'''

from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available


@dataclass
class  _UpperCAmelCase ( lowerCAmelCase__    ):

     """simple docstring"""

     a_    	=					42
     a_    	=					42


if is_transformers_available() and is_torch_available():
    from .pipeline_semantic_stable_diffusion import SemanticStableDiffusionPipeline


