| sd_default_params | R Documentation |
Returns a named list of all per-generation defaults used by
sd_generate. Edit the returned list and pass it back via the
params argument to set a reusable baseline; any explicit argument to
sd_generate() overrides the matching field.
sd_default_params()
This is the R-level analogue of IRIS_PARAMS_DEFAULT. It covers
generation knobs only; context-construction options (model paths, devices,
offload, etc.) belong to sd_ctx.
A named list with fields: negative_prompt, width,
height, strength, sample_method, sample_steps,
cfg_scale, seed, batch_count, scheduler,
clip_skip, eta, hr_strength, vae_mode,
vae_tile_size, vae_tile_overlap, cache_mode,
cache_config.
sd_generate
p <- sd_default_params()
p$sample_steps <- 30
p$cfg_scale <- 4.0
## Not run:
ctx <- sd_ctx("model.safetensors", model_type = "auto")
imgs <- sd_generate(ctx, "a cat", params = p)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.