RealVisXLV4
RealVisXL V4.0 photorealistic SDXL checkpoint.
Downloads its checkpoint into the component's own download folder.
Parameters
- negative_prompt, default=
None - num_inference_steps : integer, default=
25 - Number of denoising steps to run. More steps refine the image but increase generation time. Typical range: 20-30 for fast results, 40-50 for higher quality. SDXL achieves good results with 25-40 steps.
- guidance_scale : number, default=
7.0 - Classifier-Free Guidance (CFG) scale. Controls how strictly the image follows the text prompt. Low values (1-4) allow creative freedom; medium values (5-9) balance quality and adherence; high values (10+) enforce the prompt but may produce artifacts. SDXL works well with values between 5-9.
- device : string, default=
CPU - Hardware device for inference. Select a GPU option for hardware acceleration, strongly recommended for SDXL. CPU inference is very slow for this large model; expect 10-30 minutes per image on CPU.
- gpu_memory_mode : string, default=
auto - How much of the model is kept on the GPU. 'auto' measures free VRAM when the model loads and picks the fastest option that fits. 'full' keeps everything on the GPU (fastest, most VRAM). 'model' moves one component (text encoder, denoiser, VAE) to the GPU at a time. 'sequential' streams the weights layer by layer: slowest, but runs large models on small GPUs. Ignored on CPU.
- seed : integer, default=
-1 - Random seed for reproducible generation. A fixed positive integer will always produce the same image for identical settings. Use a negative value (e.g. -1) for a random seed on each run.
- width : integer, default=
1024 - Width of the output image in pixels. Must be a multiple of 8. SDXL's native resolution is 1024x1024 px. Using non-native resolutions may reduce quality.
- height : integer, default=
1024 - Height of the output image in pixels. Must be a multiple of 8. SDXL's native resolution is 1024x1024 px.
- num_images_per_prompt : integer, default=
1 - How many images to generate from a single prompt in one batch. Increasing this value is more efficient than running multiple sessions, but requires proportionally more GPU memory.
Methods
component_dir(cls) -> pathlib.Path
DownloadableMixinReturn this component's own storage directory.
Returns
- pathlib.Path
<COMPONENT_PATH>/<ClassName>.
delete(cls) -> None
DownloadableMixinRemove the component's downloaded artifacts.
download(cls, report: Optional[Callable[[Optional[float], Optional[str]], NoneType]] = None) -> None
HFDownloadableMixinDownload all repos listed in hf_repos() into component_dir().
Parameters
- report : ProgressReporter, optional
- Callback invoked before each repo download with
report(None, "Downloading <repo_id>").Nonemeans no progress reporting.
generate(self, input: str) -> List[Any]
StableDiffusionXLGenerationModelGenerate images from a text prompt.
Parameters
- input : str
- Text prompt to generate an image from.
Returns
- List[Any]
- Generated output images in a list.
get_credential(self, name: str)
ConfigObjectResolve a registered credential component by name.
Parameters
- name : str
- Credential component class name (e.g. "HuggingFaceCredential").
Returns
- BaseCredential
- An instance of the requested credential component.
get_metadata(cls) -> Dict[str, Any]
BaseGenerativeModelGet metadata values for the current generative model.
Returns
- Dict[str, Any]
- Dictionary indicating whether the model requires a download before use and the expected download size in bytes.
get_schema(cls) -> dict
ConfigObjectGenerates the component related Json Schema.
Returns
- dict
- Dictionary representing the Json Schema of the component.
hf_repos(cls)
HFPretrainedDownloadMixinDerive the single repo entry from MODEL_NAME.
Returns
- list of tuple of (str, str)
[(MODEL_NAME, "model")]or an empty list when unset.
is_downloaded(cls) -> bool
HFDownloadableMixinReturn whether all repo directories exist and are non-empty.
Returns
- bool
Truewhen every repo listed inhf_repos()has a non-empty local directory;Falseotherwise (including when the list is empty).
validate_and_transform(self, raw_data: dict) -> dict
ConfigObjectIt takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.
Parameters
- raw_data : dict
- A dictionary with the data provided by the user to initialize the model.
Returns
- dict
- A validated dictionary with the necessary objects.