cloneofsimo / lora

LoRA Inference model with Stable Diffusion

  • Public
  • 129.4K runs
  • A100 (80GB)
  • GitHub
  • Paper
  • License

Input

string
Shift + Return to add a new line

Input prompt. Use <1>, <2>, <3>, etc., to specify LoRA concepts

Default: "a photo of <1> riding a horse on mars"

string
Shift + Return to add a new line

Specify things to not see in the output

Default: ""

integer

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

Default: 512

integer

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

Default: 512

integer
(minimum: 1, maximum: 4)

Number of images to output.

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

file

(Img2Img) Inital image to generate variations of. If this is not none, Img2Img will be invoked.

number

(Img2Img) Prompt strength when providing the image. 1.0 corresponds to full destruction of information in init image

Default: 0.8

string

Choose a scheduler.

Default: "DPMSolverMultistep"

string
Shift + Return to add a new line

List of urls for safetensors of lora models, seperated with | .

Default: ""

string
Shift + Return to add a new line

List of scales for safetensors of lora models, seperated with |

Default: "0.5"

integer

Random seed. Leave blank to randomize the seed

file

(T2I-adapter) Adapter Condition Image to gain extra control over generation. If this is not none, T2I adapter will be invoked. Width, Height of this image must match the above parameter, or dimension of the Img2Img image.

string

(T2I-adapter) Choose an adapter type for the additional condition.

Default: "sketch"

Output

output
Generated in

This example was created by a different version, cloneofsimo/lora:bb149dd2.

Run time and cost

This model costs approximately $0.015 to run on Replicate, or 66 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 11 seconds. The predict time for this model varies significantly based on the inputs.

Readme

LoRA inference

This model creates images from text, with given extra LoRA models.

There are two LoRA training models on Replicate:

Model description

Famous state-of-the-art text2image diffusion model, stable-diffusion, can be used with LoRA to efficiently adapt to set of text, image pairs. This model takes multiple LoRA and generate images from text.

Caveats and recommendations

  • Use scale with less than 1 if the LoRA has too much effect. 0.5 ~ 0.8 is recommended for objects and less than 0.75 is recommended for styles.
  • Using multiple LoRAs does not always guarantee the effect you want.
  • Use Width, height of 512 x 512.