| sd_txt2img_highres | R Documentation |
Generates a large image by independently rendering overlapping patches at
the model's native resolution, then stitching them with linear blending.
An optional img2img harmonization pass can smooth seams further.
sd_txt2img_highres(
ctx,
prompt,
negative_prompt = "",
width = 2048L,
height = 2048L,
tile_size = NULL,
overlap = 0.125,
img2img_strength = NULL,
sample_method = SAMPLE_METHOD$EULER,
sample_steps = 20L,
cfg_scale = 7,
seed = 42L,
scheduler = SCHEDULER$DISCRETE,
clip_skip = -1L,
eta = 0,
vae_mode = "auto",
vae_auto_threshold = 1048576L,
vae_tile_size = 64L,
vae_tile_overlap = 0.25
)
ctx |
SD context created by |
prompt |
Text prompt |
negative_prompt |
Negative prompt (default "") |
width |
Target image width in pixels |
height |
Target image height in pixels |
tile_size |
Patch size in pixels. |
overlap |
Overlap between patches as fraction of |
img2img_strength |
If not |
sample_method |
Sampling method (see |
sample_steps |
Number of sampling steps (default 20) |
cfg_scale |
Classifier-free guidance scale (default 7.0) |
seed |
Base random seed. Each patch gets |
scheduler |
Scheduler type (see |
clip_skip |
Number of CLIP layers to skip (-1 = auto) |
eta |
Eta parameter for DDIM-like samplers |
vae_mode |
VAE tiling mode for the harmonization pass
(default |
vae_auto_threshold |
Pixel area fallback threshold for auto VAE tiling when VRAM query is unavailable |
vae_tile_size |
Tile size for VAE tiling (default 64) |
vae_tile_overlap |
Overlap for VAE tiling (default 0.25) |
SD image (list with width, height, channel, data)
## Not run:
ctx <- sd_ctx("sd15.safetensors", model_type = "sd1")
img <- sd_txt2img_highres(ctx, "a panoramic mountain landscape",
width = 2048, height = 1024)
sd_save_image(img, "panorama.png")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.