sd_encode_image: Encode an image into a latent (low-level VAE encode)

View source: R/lowlevel.R

sd_encode_imageR Documentation

Encode an image into a latent (low-level VAE encode)

Description

Encode an image into a latent (low-level VAE encode)

Usage

sd_encode_image(ctx, image)

Arguments

ctx

SD context (must be built with vae_decode_only = FALSE)

image

An sd_image list (width, height, channel, data) as produced by sd_load_image.

Value

An sd_tensor list (type, ne, data) — the latent.

See Also

sd_decode_latent, sd_sample


sd2R documentation built on June 19, 2026, 9:08 a.m.