View source: R/model_manager.R
| sd_register_model | R Documentation |
Adds or updates a model entry in ~/.sd2R/models.json. Paths and
defaults are stored for later use by sd_load_model.
sd_register_model(id, model_type, paths, defaults = list(), overwrite = FALSE)
id |
Unique model identifier (e.g. "flux-dev", "sd15-base") |
model_type |
Model architecture: "sd1", "sd2", "sdxl", "flux", "sd3" |
paths |
Named list of file paths. Recognized names:
|
defaults |
Named list of generation defaults (optional). Recognized:
|
overwrite |
If FALSE (default), error when id already exists |
Invisible model id
## Not run:
sd_register_model(
id = "flux-dev",
model_type = "flux",
paths = list(
diffusion = "models/flux1-dev-Q4_K_S.gguf",
vae = "models/ae.safetensors",
clip_l = "models/clip_l.safetensors",
t5xxl = "models/t5xxl_fp16.safetensors"
),
defaults = list(steps = 25, cfg_scale = 3.5, width = 1024, height = 1024)
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.