adirik / realvisxl-v4.0-lightning

Photorealism with RealVisXL V4.0 Lightning

  • Public
  • 25.9K runs
  • L40S
  • GitHub
  • License

Input

string
Shift + Return to add a new line

Input prompt

Default: "An astronaut riding a rainbow unicorn"

string
Shift + Return to add a new line

Input Negative Prompt

Default: "(worst quality, low quality, illustration, 3d, 2d, painting, cartoons, sketch), open mouth"

file

Input image for img2img or inpaint mode

integer

Width of output image

Default: 768

integer

Height of output image

Default: 768

integer
(minimum: 1, maximum: 4)

Number of images to output.

Default: 1

string

Scheduler to use, DPM++ SDE Karras is recommended

Default: "DPM++_SDE_Karras"

integer
(minimum: 1, maximum: 50)

Number of denoising steps

Default: 6

number
(minimum: 1, 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

string

Which refine style to use

Default: "no_refiner"

number
(minimum: 0, maximum: 1)

For expert_ensemble_refiner, the fraction of noise to use

Default: 0.8

integer
(minimum: 1, maximum: 50)

For base_image_refiner, the number of steps to refine, defaults to num_inference_steps

Default: 4

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: false

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](https://replicate.com/docs/how-does-replicate-work#safety)

Default: false

Output

output
Generated in

Run time and cost

This model costs approximately $0.0013 to run on Replicate, or 769 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 2 seconds.

Readme

RealVisXL V4.0 Lightning

The RealVisXL V4.0 Lightning is an SDXL model which is fine-tuned on photorealistic images. As its name suggests, it is an accelerated version of RealVisXL V4.0. See the model page or the model page of SDXL for details.

How to use the API

The API input arguments are as follows:

  • prompt: The input prompt is a text description that guides the image generation process. It should be a detailed and specific description of the desired output image.
  • negative_prompt: This parameter allows specifying negative prompts. Negative prompts are terms or descriptions that should be avoided in the generated image, helping to steer the output away from unwanted elements.
  • image: Used in img2img or inpaint modes, this parameter is for inputting an image. The provided image serves as a base or reference for the generation process.
  • mask: In inpainting mode, the mask parameter is used to define areas in the input image that should be preserved or altered.
  • width: This parameter sets the width of the output image.
  • height: This parameter sets the height of the output image.
  • num_outputs: Specifies the number of images to be generated for a given prompt. This allows for multiple variations of images based on the same input parameters.
  • scheduler: The scheduler parameter determines the algorithm used for image generation. Different schedulers can affect the quality and characteristics of the output.
  • num_inference_steps: This parameter defines the number of denoising steps in the image generation process.
  • guidance_scale: The guidance scale parameter adjusts the influence of the classifier-free guidance in the generation process. Higher values will make the model focus more on the prompt.
  • prompt_strength: In img2img or inpaint modes, this parameter controls the influence of the input prompt on the final image. A value of 1.0 indicates complete transformation according to the prompt.
  • seed: The seed parameter sets a random seed for image generation. A specific seed can be used to reproduce results, or left blank for random generation.
  • refine: This parameter selects the refining style to be applied to the generated image, offering different methods for image refinement and enhancement.
  • high_noise_frac: For the expert_ensemble_refiner, this parameter specifies the fraction of noise to use, impacting the refinement process’s intensity.
  • refine_steps: In the context of the base_image_refiner, this sets the number of steps for refining the image, defaulting to the number of inference steps if not specified.
  • apply_watermark: Enables the application of a watermark to the generated images. This can be useful for identifying images generated by the system in downstream applications.
  • disable_safety_checker: Disable safety checker for generated images. This feature is only available through the API. See https://replicate.com/docs/how-does-replicate-work#safety

Model Details

Original Model: https://civitai.com/models/139562/realvisxl-v40-lightning

Some important usage tips from the original model page:

  • Best performance comes with the scheduler “DPM++ SDE Karras” which is the default value in the API.
  • Classifier Free Guidance or Guidance Scale should be in between 1.0-2.0.
  • Recommended number of sampling / denoising steps is 4-6.