Views
No views yet
Chinese line art to trigger the image generation.1import torch
2from diffusers import StableDiffusion3Pipeline # pip install diffusers>=0.31.0
3
4pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-large", torch_dtype=torch.bfloat16)
5pipe.load_lora_weights("Shakker-Labs/SD3.5-LoRA-Chinese-Line-Art", weight_name="SD35-lora-Chinese-Line-Art.safetensors")
6pipe.fuse_lora(lora_scale=1.0)
7pipe.to("cuda")
8
9prompt = "a boat on the river, mountain in the distance, Chinese line art"
10negative_prompt = "(lowres, low quality, worst quality)"
11
12image = pipe(prompt=prompt,
13 negative_prompt=negative_prompt
14 num_inference_steps=24,
15 guidance_scale=4.0,
16 width=960, height=1280,
17 ).images[0]
18image.save(f"toy_example.jpg")