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.