



"""simple docstring"""


from itertools import compress, repeat
from math import ceil, sqrt

def 					_lowerCAmelCase (  lowercase_		):

						if num <= 2:
												return []
						if num == 3:
												return [2]

						# Odd sieve for numbers in range [3, num - 1]
						UpperCAmelCase			 =					bytearray(B'\x01'		) * ((num >> 1) - 1)

						for i in range(3						,      int(sqrt(lowercase_		)		) + 1						,      2		):
												if sieve[(i >> 1) - 1]:
																		UpperCAmelCase			 =					i**2
																		UpperCAmelCase			 =					repeat(
																		    0						,      ceil((num - i_squared) / (i << 1)		)		)

						return [2] + list(compress(range(3						,      lowercase_						,      2		)						,      lowercase_		)		)


if __name__ == "__main__":
				import doctest

				doctest.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				(		SCREAMING_SNAKE_CASE						):


			'''simple docstring'''





			__a				:				Union[List[PIL.Image.Image], np.ndarray]
			__a				:				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
