Downloads · 30 days
18
13% of all-time downloads
SkyAsl/Portrait-generator
Portrait-generator is a text-to-image model from SkyAsl. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as apache-2.0.
Portrait-generator is a LoRA fine-tuned adapter for the stable-diffusion-xl-base-1.0 model, trained on the Rapidata/FaceGenerationBenchmark dataset. It specializes in generating face images.
Downloads · 30 days
18
13% of all-time downloads
All-time downloads
143
Public
Repo size
46.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors46.6 MB · 100%
From the Hugging Face model README
Portrait-generator is a LoRA fine-tuned adapter for the stable-diffusion-xl-base-1.0 model, trained on the Rapidata/Face_Generation_Benchmark dataset. It specializes in generating face images.
pip install diffusers transformers accelerate safetensor torch
from diffusers import DiffusionPipeline
import torch
pipe = DiffusionPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
torch_dtype=torch.float16,
).to("cuda")
pipe.load_lora_weights("SkyAsl/Portrait-generator")
pipe.fuse_lora()
image = pipe("a high-quality portrait of a woman").images[0]
image.save("test.png")