Views
No views yet
| Strength: -3 | Strength: 0 | Strength: 3 |
|---|---|---|
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
in a blizzard1from diffusers import StableDiffusionXLPipeline
2from diffusers import EulerAncestralDiscreteScheduler
3import torch
4
5pipe = StableDiffusionXLPipeline.from_single_file("https://huggingface.co/martyn/sdxl-turbo-mario-merge-top-rated/blob/main/topRatedTurboxlLCM_v10.safetensors")
6pipe.to("cuda")
7pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
8
9# Load the LoRA
10pipe.load_lora_weights('ntc-ai/SDXL-LoRA-slider.in-a-blizzard', weight_name='in a blizzard.safetensors', adapter_name="in a blizzard")
11
12# Activate the LoRA
13pipe.set_adapters(["in a blizzard"], adapter_weights=[2.0])
14
15prompt = "medieval rich kingpin sitting in a tavern, in a blizzard"
16negative_prompt = "nsfw"
17width = 512
18height = 512
19num_inference_steps = 10
20guidance_scale = 2
21image = pipe(prompt, negative_prompt=negative_prompt, width=width, height=height, guidance_scale=guidance_scale, num_inference_steps=num_inference_steps).images[0]
22image.save('result.png')