View source: R/model_manager.R
| sd_load_model | R Documentation |
Loads a model by its registry id. Returns a cached context if already
loaded, otherwise creates a new sd_ctx. Additional
arguments override registry defaults.
sd_load_model(id, ...)
id |
Model identifier from registry |
... |
Additional arguments passed to |
If loading fails due to insufficient VRAM, automatically unloads the least recently used model and retries.
SD context (external pointer)
## Not run:
ctx <- sd_load_model("flux-dev")
imgs <- sd_txt2img(ctx, "a cat in space")
# Override defaults
ctx <- sd_load_model("flux-dev", vae_decode_only = FALSE, verbose = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.