--- library_name: diffusers pipeline_tag: text-to-image --- # Style Portrait ![preview](sample.png) Style Portrait is a SD-v1.5 based text-to-image generation model. It can generate high-quality 512*832 images of Asia portrait. This repository contains checkpoints for diffusers and SD-WebUI. # Checkpoints - style-portait-v1-5-fp16.safetensors: Checkpoint for Stable-Diffusion-WebUI. - Others: Checkpoint for Diffusers. # Diffusers Usage ```python3 import torch from diffusers import DiffusionPipeline model_id = "Tramac/style-portrait-v1-5" pipeline = DiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16) pipeline = pipeline.to("cuda") prompt = "1girl, long hair, close-up, elegant, upper body, natural skin texture, highly detailed" negative_prompt = "cloned face, ugly, out of frame, mutated, extra arms, cross-eye, blurry, bad art, bad anatomy, badhands, watermark, text, long neck, worst quality, low quality" image = pipeline( prompt=prompt, negative_prompt=negative_prompt, height=832, width=512, ).images[0] image.save("demo.png") ``` # WebUI Usage 1. Download the checkpoint (style-portait-v1-5-fp16.safetensors) to /Stable-Diffusion-WebUI/models/Stable-diffusion. 2. Start up WebUI and load checkpoint.