--- license: openrail language: - en tags: - stable-diffusion - stable-diffusion-diffusers - stable-diffusion-xl - lora - diffusers base_model: stabilityai/stable-diffusion-xl-base-1.0 datasets: - frank-chieng/michelle_yeoh metrics: - character library_name: diffusers inference: parameter: negative_prompt: >- poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, bad anatomy, watermark, signature, cut off, low contrast, underexposed, overexposed, bad art, beginner, amateur, distorted face widget: - text: >- an exquisite portrait photograph, 85mm medium format photo of michelle yeoh with a classic haircut example_title: example1 michelleyeoh - text: >- professional fashion close-up portrait photography of a young beautiful michelle yeoh at Chinese restaurant during Sunset, Nikon Z9 example_title: example2 michelleyeoh pipeline_tag: text-to-image --- ## Sample Image: sample1 ## Overview **Character Lora Michelle Yeoh** is a lora training model with sdxl1.0 base model, latent text-to-image diffusion model. The model has been fine-tuned using a learning rate of `1e-5` over 3000 total steps with a batch size of 4 on a curated dataset of superior-quality michelle yeoh images. This model is derived from Stable Diffusion XL 1.0. - Use it with 🧨 [`diffusers`](https://huggingface.co/docs/diffusers/index) - Use it with the [`ComfyUI`](https://github.com/comfyanonymous/ComfyUI) **(recommended)** - ### Model Description - **Developed by:** [FrankChieng](https://github.com/frankchieng) - **Model type:** Diffusion-based text-to-image generative model - **License:** [CreativeML Open RAIL++-M License](https://huggingface.co/stabilityai/stable-diffusion-2/blob/main/LICENSE-MODEL) - **Finetuned from model [optional]:** [Stable Diffusion XL 1.0 base](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0)
## How to Use: - Download `Lora model` [here](https://huggingface.co/frank-chieng/michelleyeoh/blob/main/michelleyeoh.safetensors), the model is in `.safetensors` format. - You need to use include michelle yeoh prompt in natural language, then you will get realistic result image - You can use any generic negative prompt or use the following suggested negative prompt to guide the model towards high aesthetic generationse: ``` poorly drawn hands, poorly drawn feet, poorly drawn face, out of frame, extra limbs, disfigured, deformed, body out of frame, bad anatomy, watermark, signature, cut off, low contrast, underexposed, overexposed, bad art, beginner, amateur, distorted face ``` - And, the following should also be prepended to prompts to get high aesthetic results: ``` masterpiece, best quality ```
## Google Colab [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1XKtH60kIrbRNIo6jQWlyTvCcaiXqbNa3?usp=sharing) ## 🧨 Diffusers Make sure to upgrade diffusers to >= 0.18.2: ``` pip install diffusers --upgrade ``` In addition make sure to install `transformers`, `safetensors`, `accelerate` as well as the invisible watermark: ``` pip install invisible_watermark transformers accelerate safetensors ``` Running the pipeline (if you don't swap the scheduler it will run with the default **EulerDiscreteScheduler** in this example we are swapping it to **EulerAncestralDiscreteScheduler**: ```py pip install -q --upgrade diffusers invisible_watermark transformers accelerate safetensors pip install huggingface_hub from huggingface_hub import notebook_login notebook_login() import torch from torch import autocast from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler base_model_id = "stabilityai/stable-diffusion-xl-base-1.0" lora_model = "frank-chieng/michelleyeoh" pipe = StableDiffusionXLPipeline.from_pretrained( base_model_id, torch_dtype=torch.float16, use_safetensors=True, ) pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config) pipe.load_lora_weights(lora_model, weight_name="michelleyeoh.safetensors") pipe.to('cuda') prompt = "professional fashion close-up portrait photography of a young beautiful michelle yeoh at German restaurant during Sunset, Nikon Z9" negative_prompt = "3d render" image = pipe( prompt, negative_prompt=negative_prompt, width=1024, height=1024, guidance_scale=7, target_size=(1024,1024), original_size=(4096,4096), num_inference_steps=28 ).images[0] image.save("michelle_yeoh.png") ```
## Limitation This model inherit Stable Diffusion XL 1.0 [limitation](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0#limitations)