cjwbw / stable-diffusion-v2

sd-v2 with diffusers, test version!

  • Public
  • 280.3K runs
  • A100 (80GB)

Input

string
Shift + Return to add a new line

Input prompt

Default: "a photo of an astronaut riding a horse on mars"

string
Shift + Return to add a new line

The prompt NOT to guide the image generation. Ignored when not using guidance

integer

Width of output image. Maximum size is 1024x768 or 768x1024 because of memory limits

Default: 768

integer

Height of output image. Maximum size is 1024x768 or 768x1024 because of memory limits

Default: 768

file

Initial image to generate variations of. Will be resized to the specified width and height

number

Prompt strength when using init image. 1.0 corresponds to full destruction of information in init image

Default: 0.8

integer
(minimum: 1, maximum: 3)

Number of images to output. Currenly allowing 1-3, otherwise would OOM.

Default: 1

integer
(minimum: 1, maximum: 500)

Number of denoising steps

Default: 50

number
(minimum: 1, maximum: 20)

Scale for classifier-free guidance

Default: 7.5

string

Choose a scheduler. Seems only DDIM and K_EULER and DPMSolverMultistep work for sd-v2 now.

Default: "K_EULER"

integer

Random seed. Leave blank to randomize the seed

Output

output
Generated in

This example was created by a different version, cjwbw/stable-diffusion-v2:867f87d0.

Run time and cost

This model costs approximately $0.032 to run on Replicate, or 31 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 A100 (80GB) GPU hardware. Predictions typically complete within 23 seconds. The predict time for this model varies significantly based on the inputs.

Readme

weights from: https://huggingface.co/stabilityai/stable-diffusion-2, fp32 version code for the demo: https://github.com/chenxwh/cog-stable-diffusion/tree/sd-v2

TEST version!

This stable-diffusion-2 model is resumed from stable-diffusion-2-base (512-base-ema.ckpt) and trained for 150k steps using a v-objective on the same dataset. Resumed for another 140k steps on 768x768 images.

Compared to the mainline stable-diffusion https://replicate.com/stability-ai/stable-diffusion, the differences are: - seems only DDIM, K_EULER, and DPMSolverMultistep schedulers work properly - removed image inpainting pipeline - Default size set 768X768 - less num_output is allowed to fit to on V100