code: 
  
  
  
  
  
  '''simple docstring'''
  
  
  
  
  
  
  
  import gc
  import tempfile
  import unittest
  
  import numpy as np
  import torch
  
  from diffusers import VersatileDiffusionDualGuidedPipeline
  from diffusers.utils.testing_utils import load_image, nightly, require_torch_gpu, torch_device
  
  
  _a      :				Any											=					False
  
  
  
  
  
  @nightly
  @require_torch_gpu
  class 					_UpperCAmelCase							(		unittest.TestCase     ):
  		def 						lowerCamelCase__    (						self    ):
  
  
  
  					'''simple docstring'''
  
  					super().tearDown()
  					gc.collect()
  					torch.cuda.empty_cache()
  		def 						lowerCamelCase__    (						self    ):
  
  
  
  					'''simple docstring'''
  
  					__lowerCAmelCase      		=       VersatileDiffusionDualGuidedPipeline.from_pretrained("""shi-labs/versatile-diffusion"""    )
  					# remove text_unet
  					pipe.remove_unused_weights()
  					pipe.to(_A    )
  					pipe.set_progress_bar_config(disable=_A    )
  
  					__lowerCAmelCase      		=       load_image(
  					    """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/versatile_diffusion/benz.jpg"""    )
  
  					__lowerCAmelCase      		=       torch.manual_seed(0    )
  					__lowerCAmelCase      		=       pipe(
  					    prompt="""first prompt""",image=_A,text_to_image_strength=0.75,generator=_A,guidance_scale=7.5,num_inference_steps=2,output_type="""numpy""",).images
  
  					with tempfile.TemporaryDirectory() as tmpdirname:
  								pipe.save_pretrained(_A    )
  								__lowerCAmelCase      		=       VersatileDiffusionDualGuidedPipeline.from_pretrained(_A    )
  
  					pipe.to(_A    )
  					pipe.set_progress_bar_config(disable=_A    )
  
  					__lowerCAmelCase      		=       generator.manual_seed(0    )
  					__lowerCAmelCase      		=       pipe(
  					    prompt="""first prompt""",image=_A,text_to_image_strength=0.75,generator=_A,guidance_scale=7.5,num_inference_steps=2,output_type="""numpy""",).images
  
  					assert np.abs(image - new_image    ).sum() < 1e-5, "Models don't have the same forward pass"
  
  
  
  
  
  
  
  		def 						lowerCamelCase__    (						self    ):
  
  
  
  					'''simple docstring'''
  
  					__lowerCAmelCase      		=       VersatileDiffusionDualGuidedPipeline.from_pretrained("""shi-labs/versatile-diffusion"""    )
  					pipe.remove_unused_weights()
  					pipe.to(_A    )
  					pipe.set_progress_bar_config(disable=_A    )
  
  					__lowerCAmelCase      		=       'cyberpunk 2077'
  					__lowerCAmelCase      		=       load_image(
  					    """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/versatile_diffusion/benz.jpg"""    )
  					__lowerCAmelCase      		=       torch.manual_seed(0    )
  					__lowerCAmelCase      		=       pipe(
  					    prompt=_A,image=_A,text_to_image_strength=0.75,generator=_A,guidance_scale=7.5,num_inference_steps=50,output_type="""numpy""",).images
  
  					__lowerCAmelCase      		=       image[0, 2_53:2_56, 2_53:2_56, -1]
  
  					assert image.shape == (1, 5_12, 5_12, 3)
  					__lowerCAmelCase      		=       np.array([0.0787, 0.0849, 0.0826, 0.0812, 0.0807, 0.0795, 0.0818, 0.0798, 0.0779]    )
  
  					assert np.abs(image_slice.flatten() - expected_slice    ).max() < 1e-2
  
  
  
style_context: 
  
  
  
  
  
  '''simple docstring'''
  
  
  
  
  
  
  
  def      _lowerCAmelCase		(		lowercase = 1000			)      ->      int:
  			__lowerCAmelCase      		=       []
  			__lowerCAmelCase      		=       []
  			__lowerCAmelCase      		=       3
  			__lowerCAmelCase      		=       5
  			__lowerCAmelCase      		=       1
  			while True:
  						__lowerCAmelCase      		=       z * temp
  						if result < n:
  									zmulti.append(lowercase			)
  									temp += 1
  						else:
  									__lowerCAmelCase      		=       1
  									break
  			while True:
  						__lowerCAmelCase      		=       x * temp
  						if result < n:
  									xmulti.append(lowercase			)
  									temp += 1
  						else:
  									break
  			__lowerCAmelCase      		=       list(set(xmulti + zmulti			)			)
  			return sum(lowercase			)
  
  
  if __name__ == "__main__":
  	print(f'{solution() = }')
  
  