nightmareai / k-diffusion

CLIP Guided latent k-diffusion

  • Public
  • 7.4K runs
  • T4
  • GitHub
  • Paper
  • License

Input

string
Shift + Return to add a new line

Prompt

Default: "A mysterious orb by Ernst Fuchs"

string

Sampling mode

Default: "DPM-2"

number

The amount of noise to add during sampling

Default: 50

file

Initial image for the generation

integer

The starting noise level when using an init image

Default: 10

integer

This enhances the effect of the init image, a good value is 1000.

Default: 1000

file

Image prompt (CLIP only)

integer
(minimum: 50, maximum: 1000)

The number of timesteps to use

Default: 500

integer

Latent guidance scale, higher for stronger latent guidance.

Default: 5

integer

CLIP guidance scale, higher for stronger clip guidance. 0 to disable CLIP guidance.

Default: 1000

integer

The number of random crops per step.

Default: 16

number

Cut power

Default: 0.5

integer
(minimum: 0, maximum: 4294967295)

Seed (leave empty to use a random seed)

integer
(minimum: 0, maximum: 50)

Display an image after this many steps.

Default: 10

Output

output
Generated in

This example was created by a different version, nightmareai/k-diffusion:4422635b.

Run time and cost

This model costs approximately $0.15 to run on Replicate, or 6 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 T4 GPU hardware. Predictions typically complete within 12 minutes. The predict time for this model varies significantly based on the inputs.

Readme

This demo is based a simplified diffusion codebase implemented by RiversHaveWings (Katherine Crowson).

Currently it implements CLIP guidance on Jack’s finetuned latent diffusion using OpenCLIP ViT32-LAION2b. This runs slowly due to parameters in the model requiring gradient calculation.

This is a testbed for future developments and will change often and possibly break. You have been warned.