lucataco / dreamshaper-xl-lightning

dreamshaper-xl-lightning is a Stable Diffusion model that has been fine-tuned on SDXL

  • Public
  • 107.9K runs
  • L40S
  • GitHub
  • License

Input

string
Shift + Return to add a new line

Input prompt

Default: "portrait photo of muscular bearded guy in a worn mech suit, light bokeh, intricate, steel metal, elegant, sharp focus, soft lighting, vibrant colors"

string
Shift + Return to add a new line

Negative Input prompt

Default: "ugly, blurry"

file

Input image for img2img or inpaint mode

file

Input mask for inpaint mode. Black areas will be preserved, white areas will be inpainted.

integer

Width of output image. Recommended 1024 or 1280

Default: 1024

integer

Height of output image. Recommended 1024 or 1280

Default: 1024

integer
(minimum: 1, maximum: 4)

Number of images to output.

Default: 1

string

scheduler

Default: "DPMSolverMultistep"

integer
(minimum: 1, maximum: 100)

Number of denoising steps

Default: 4

number
(minimum: 0, maximum: 50)

Scale for classifier-free guidance

Default: 2

number
(minimum: 0, maximum: 1)

Prompt strength when using img2img / inpaint. 1.0 corresponds to full destruction of information in image

Default: 0.8

integer

Random seed. Leave blank to randomize the seed

boolean

Applies a watermark to enable determining if an image is generated in downstream applications. If you have other provisions for generating or deploying images safely, you can use this to disable watermarking.

Default: true

boolean

This model’s safety checker can’t be disabled when running on the website. Learn more about platform safety on Replicate.

Disable safety checker for generated images. This feature is only available through the API. See https://replicate.com/docs/how-does-replicate-work#safety

Default: false

Output

output
Generated in

Run time and cost

This model costs approximately $0.0063 to run on Replicate, or 158 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 7 seconds.

Readme

Dreamshaper XL Lightning

lykon/dreamshaper-xl-lightning is a Stable Diffusion model that has been fine-tuned on stabilityai/stable-diffusion-xl-base-1.0.

Diffusers

For more general information on how to run text-to-image models with 🧨 Diffusers, see the docs.

  1. Installation
pip install diffusers transformers accelerate
  1. Run
from diffusers import AutoPipelineForText2Image, DPMSolverMultistepScheduler
import torch

pipe = AutoPipelineForText2Image.from_pretrained('lykon/dreamshaper-xl-v2-lightning', torch_dtype=torch.float16, variant="fp16")
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
pipe = pipe.to("cuda")

prompt = "portrait photo of muscular bearded guy in a worn mech suit, light bokeh, intricate, steel metal, elegant, sharp focus, soft lighting, vibrant colors"

generator = torch.manual_seed(0)
image = pipe(prompt, num_inference_steps=4, guidance_scale=2).images[0]  
image.save("./image.png")