# Genshin_Impact_VENTI_Flex2_Lora ## Installtion ```bash pip install -U diffusers transformers torch sentencepiece peft controlnet-aux moviepy protobuf ``` ## Demo ```python #import os #os.environ['HF_ENDPOINT'] = 'https://hf-mirror.com' #### git clone https://huggingface.co/ostris/Flex.2-preview import torch from diffusers import AutoPipelineForText2Image from diffusers.utils import load_image #name_or_path = "ostris/Flex.2-preview" name_or_path = "Flex.2-preview" dtype = torch.bfloat16 pipe = AutoPipelineForText2Image.from_pretrained( name_or_path, custom_pipeline=name_or_path, torch_dtype=dtype ) pipe.load_lora_weights("Genshin_Impact_VENTI_Flex2_Lora/my_first_flex2_lora_v1_000001750.safetensors") pipe.enable_sequential_cpu_offload() import numpy as np from PIL import Image image = pipe( prompt="VENTI answer calls with headphones", inpaint_image=Image.fromarray(np.zeros((1024, 1024, 3)).astype(np.uint8)), inpaint_mask=Image.fromarray(np.ones((1024, 1024, 3), dtype=np.uint8) * 255), control_image=Image.fromarray(np.zeros((1024, 1024, 3)).astype(np.uint8)), control_strength=0.5, control_stop=0.33, height=1024, width=1024, guidance_scale=3.5, num_inference_steps=50, generator=torch.Generator("cpu").manual_seed(42) ).images[0] image.save("calls_with_headphones.png") ``` ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/VM9VooweD6rX5C_LeT8ZD.png)