| sd_preview_start | R Documentation |
Installs the preview callback so that, during the next generation, the most
recent intermediate frame is written to path (a single PPM file,
updated atomically). Poll it with sd_read_preview. Call
sd_preview_stop when done.
sd_preview_start(path, mode = PREVIEW$PROJ, interval = 1L, denoised = TRUE)
path |
File path for the preview PPM (e.g. a tempfile). |
mode |
Decode mode, one of |
interval |
Emit a preview every N sampling steps (default 1). |
denoised |
If |
Most users pass preview = TRUE to sd_generate instead,
which wires this up automatically.
Invisibly, path.
sd_read_preview, sd_preview_stop
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.