Crandore Hub

sd2R

Stable Diffusion Image Generation

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.

Versions across snapshots

VersionRepositoryFileSize
0.1.9 rolling linux/jammy R-4.5 sd2R_0.1.9.tar.gz 9.1 MiB
0.1.9 rolling linux/noble R-4.5 sd2R_0.1.9.tar.gz 9.2 MiB
0.1.9 rolling source/ R- sd2R_0.1.9.tar.gz 1.4 MiB
0.1.9 latest linux/jammy R-4.5 sd2R_0.1.9.tar.gz 9.1 MiB
0.1.9 latest linux/noble R-4.5 sd2R_0.1.9.tar.gz 9.2 MiB
0.1.9 latest source/ R- sd2R_0.1.9.tar.gz 1.4 MiB
0.1.9 2026-04-26 source/ R- sd2R_0.1.9.tar.gz 1.4 MiB
0.1.9 2026-04-23 source/ R- sd2R_0.1.9.tar.gz 1.4 MiB
0.1.7 2026-04-09 windows/windows R-4.5 sd2R_0.1.7.zip 9.4 MiB

Dependencies (latest)

Imports

LinkingTo

Suggests