sd2R
Stable Diffusion Image Generation
Description
Provides Stable Diffusion image generation in R using the 'ggmlR' tensor library. Supports text-to-image and image-to-image generation with multiple model versions (SD 1.x, SD 2.x, 'SDXL', Flux). Implements the full inference pipeline including CLIP text encoding, 'UNet' noise removal, and 'VAE' encoding/decoding. Unified sd_generate() entry point with automatic strategy selection (direct, tiled sampling, high-resolution fix) based on output resolution and available 'VRAM'. High-resolution generation (2K, 4K+) via tiled 'VAE' decoding, tiled diffusion sampling ('MultiDiffusion'), and classic two-pass refinement (text-to-image, then upscale with image-to-image). Multi-GPU parallel generation via sd_generate_multi_gpu(). Multi-GPU model parallelism via 'device_layout' in sd_ctx(): distribute diffusion, text encoders, and 'VAE' across separate 'Vulkan' devices. Built-in profiling (sd_profile_start(), sd_profile_summary()) for per-stage timing of text encoding, sampling, and 'VAE' decode. Supports CPU and 'Vulkan' GPU. No 'Python' or external API dependencies required. Cross-platform: Linux, macOS, Windows.
Downloads
78
Last 30 days
23567th
78
Last 90 days
78
Last year
CRAN Check Status
Show all 12 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | ERROR |
| r-devel-linux-x86_64-fedora-gcc | ERROR |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-x86_64 | NOTE |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (4 non-OK)
whether package can be installed
Installation failed. See ‘/data/gannet/ripley/R/packages/tests-clang/sd2R.Rcheck/00install.out’ for details.
whether package can be installed
Installation failed. See ‘/data/gannet/ripley/R/packages/tests-devel/sd2R.Rcheck/00install.out’ for details.
for GNU extensions in Makefiles
GNU make is a SystemRequirements.
installed package size
installed size is 59.5Mb
sub-directories of 1Mb or more:
libs 56.3Mb
vocab 2.8Mb
Check History
ERROR 4 OK · 1 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE Mar 31, 2026
whether package can be installed
Installation failed. See ‘/data/gannet/ripley/R/packages/tests-clang/sd2R.Rcheck/00install.out’ for details.
whether package can be installed
Installation failed. See ‘/data/gannet/ripley/R/packages/tests-devel/sd2R.Rcheck/00install.out’ for details.
installed package size
installed size is 59.5Mb
sub-directories of 1Mb or more:
libs 56.3Mb
vocab 2.8Mb