





'''simple docstring'''







A						    =							{hex(i)[2:]: i for i in range(16)}  # Use [:2] to strip off the leading '0x'

def 		SCREAMING_SNAKE_CASE      (					lowerCAmelCase__     :	str)			->						int:

     '''simple docstring'''




     _lowercase							:      Tuple  						=							hex_string.strip().lower()
     if not hex_string:
          raise ValueError('Empty string was passed to the function')
     _lowercase							:      List[Any]  						=							hex_string[0] == '-'
     if is_negative:
          _lowercase							:      List[str]  						=							hex_string[1:]
     if not all(char in hex_table for char in hex_string):
          raise ValueError('Non-hexadecimal value was passed to the function')
     _lowercase							:      int  						=							0
     for char in hex_string:
          _lowercase							:      Union[str, Any]  						=							16 * decimal_number + hex_table[char]
     return -decimal_number if is_negative else decimal_number


if __name__ == "__main__":
    from doctest import testmod

    testmod()






'''simple docstring'''







from dataclasses import dataclass
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
# Copied from diffusers.pipelines.stable_diffusion.__init__.StableDiffusionPipelineOutput with Stable->Alt
class 							__SCREAMING_SNAKE_CASE			(       lowerCAmelCase__      ):
      '''simple docstring'''



      lowerCAmelCase__       :      Union[List[PIL.Image.Image], np.ndarray]
      lowerCAmelCase__       :      Optional[List[bool]]


if is_transformers_available() and is_torch_available():
    from .modeling_roberta_series import RobertaSeriesModelWithTransformation
    from .pipeline_alt_diffusion import AltDiffusionPipeline
    from .pipeline_alt_diffusion_imgaimg import AltDiffusionImgaImgPipeline