--- library_name: diffusers --- ## Generate Genshin Impact LandScape style image by lora tuned on stable-diffusion-xl ### Install ```bash pip install git+https://github.com/huggingface/diffusers.git peft ``` ```python import torch from diffusers import ( StableDiffusionXLPipeline, AutoencoderKL, ) vae = AutoencoderKL.from_pretrained( "madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16, use_safetensors=True ) model_path = "stabilityai/stable-diffusion-xl-base-1.0" pipe = StableDiffusionXLPipeline.from_pretrained( model_path, torch_dtype=torch.float16, vae=vae ) pipe.to("cuda") pipe.load_lora_weights("svjack/Genshin-Impact-LandScape-lora-sd-xl-rk4") ``` ### Generate Genshin Mondstadt LandScape Image ```python prompt = "European, green coniferous tree, yellow coniferous tree, rock, creek, sunny day, pastel tones, 3D" image = pipe(prompt=prompt, num_inference_steps=50, guidance_scale=5.0, cross_attention_kwargs={"scale": 0.7} ).images[0] image ``` ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/mYqjyVryMY6WZvDTrEFuN.png) ### Generate Genshin Mondstadt LandScape Clear Image ```python prompt = "European, green coniferous tree, yellow coniferous tree, rock, creek, sunny day, pastel tones, 3D" image = pipe(prompt=prompt, negative_prompt = "blurred, uneven, messy, foggy", num_inference_steps=50, guidance_scale=5.0, cross_attention_kwargs={"scale": 0.7} ).images[0] image ``` ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/0SwXIjMix6ynurnpepj09.png) ### Generate Genshin Liyue LandScape Image ```python prompt = "Chinese, yellow deciduous wood, orange deciduous wood, rock, sunny day, pastel tones, 3D" image = pipe(prompt=prompt, num_inference_steps=50, guidance_scale=5.0, cross_attention_kwargs={"scale": 0.7} ).images[0] image ``` ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/mZNb7Mww21nT21odVb73D.png) ### Generate Genshin Liyue LandScape Clear Image ```python prompt = "Chinese, yellow deciduous wood, orange deciduous wood, rock, sunny day, bright, 3D" image = pipe(prompt=prompt, num_inference_steps=50, guidance_scale=5.0, cross_attention_kwargs={"scale": 0.7} ).images[0] image ``` ![image/png](https://cdn-uploads.huggingface.co/production/uploads/634dffc49b777beec3bc6448/QiXKTmYu3XILSFTH9qID7.png)