This model is a fine-tuned version of the Stable Diffusion architecture, leveraging the Low-Rank Adaptation (LoRA) technique. It has been trained using the CelebA-HQ and FFHQ datasets, both renowned for their high-quality images of human faces.
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("lokesh6309/Diff_Face", 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
We use four prompts as follows:
A rugged face with a thick mustache, dark eyes under a wide-brimmed hat. The expression is stern and untrustworthy, with wrinkles indicating years of experience as a notorious thief. Dressed in worn-out clothes, he carries an air of danger.
If the generation effect is not good, try adding a negative prompt, or try different prompts and seeds.
Weights for this model are available in Safetensors format.
Download them in the Files & versions tab.