Views
No views yet
1
2import torch
3from diffusers import StableDiffusionPipeline,UNet2DConditionModel
4
5pipeline = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5").to("cuda")
6
7pipeline.load_lora_weights("phil329/face_lora_sd15", weight_name="pytorch_lora_weights.safetensors")
8
9NEGATIVE_PROMPT = "worst quality, low quality, bad anatomy, watermark, text, blurry, cartoon, unreal"
10text = 'A young woman with smile, wearing a purple hat.'
11
12lora_image = pipeline(text,negative_prompt=NEGATIVE_PROMPT).images[0]
13
14display(lora_image)
15