# Stable Diffusion Image Generation

## Documentation for package ‘sd2R’ version 0.2.1

- DESCRIPTION file
- Package NEWS
- Package README

## Help Pages

LORA_APPLY_MODE | LoRA apply modes
PREDICTION | Prediction types
PREVIEW | Preview decode modes
RNG_TYPE | RNG types
SAMPLE_METHOD | Sampling methods
SCHEDULER | Schedulers
sd_api_start | Start sd2R REST API server
sd_api_stop | Stop sd2R REST API server
sd_app | Launch sd2R Shiny GUI
SD_CACHE_MODE | Cache modes
sd_cache_params | Create cache configuration for step caching
sd_convert | Convert model to different quantization format
sd_ctx | Create a Stable Diffusion context
sd_decode_latent | Decode a latent into a pixel image (low-level VAE decode)
sd_default_params | Default generation parameters
sd_denoise_step | Run a single denoise step (low-level)
sd_destroy_context | Release a stable diffusion context and free its VRAM
sd_download_model | Download a Stable Diffusion model from Kaggle Models
sd_encode_image | Encode an image into a latent (low-level VAE encode)
sd_encode_text | Encode a text prompt into conditioning (low-level)
sd_generate | Generate images (unified entry point)
sd_generate_multiref | Generate an image conditioned on multiple reference images
sd_generate_multi_gpu | Parallel generation across multiple GPUs
sd_image_to_array | Convert SD image to R numeric array
sd_img2img | Generate images with img2img
sd_inverse_noise_scale | Undo final-step latent scaling (low-level)
sd_list_models | List registered models
sd_load_image | Load image from file as SD image
sd_load_mask | Load a mask from a PNG file as a 1-channel SD image
sd_load_model | Load a registered model
sd_load_pipeline | Load pipeline from JSON
sd_node | Create a pipeline node
sd_noise_scale | Scale noise into the starting latent (low-level)
sd_pipeline | Create a pipeline from nodes
sd_preview_start | Enable live generation previews
sd_preview_stop | Disable live generation previews
sd_profile_get | Get raw profile events
sd_profile_start | Start profiling
sd_profile_stop | Stop profiling
sd_profile_summary | Build a profile summary from raw events
sd_read_preview | Read the current preview frame
sd_register_model | Register a model in the sd2R model registry
sd_remove_model | Remove a model from the registry
sd_run_pipeline | Run a pipeline
sd_sample | Run the sampling loop (low-level)
sd_sampler_begin | Open / close a step-wise sampling window (low-level)
sd_sampler_end | Open / close a step-wise sampling window (low-level)
sd_sampler_sigmas | Sigma schedule for a sampler (low-level)
sd_sample_stepwise | Run the sampling loop step-by-step in R (low-level)
sd_save_image | Save SD image to PNG file
sd_save_pipeline | Save pipeline to JSON
sd_scan_models | Scan a directory for models and register them
sd_supports_ref_images | Does the loaded model support reference images?
sd_system_info | Get system information
sd_txt2img | Generate images from text prompt
sd_txt2img_highres | High-resolution image generation via patch-based pipeline
sd_txt2img_tiled | Tiled diffusion sampling (MultiDiffusion)
SD_TYPE | Weight types (ggml quantization types)
sd_unload_all | Unload all models from memory
sd_unload_model | Unload a model from memory
sd_upscale_image | Upscale an image using ESRGAN
sd_vulkan_device_count | Get number of Vulkan GPU devices