<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CUDA on jdcsen</title><link>https://jdcsen.com/tags/cuda/</link><description>Recent content in CUDA on jdcsen</description><generator>Hugo</generator><language>en</language><lastBuildDate>Thu, 01 Jan 1970 00:33:46 +0000</lastBuildDate><atom:link href="https://jdcsen.com/tags/cuda/index.xml" rel="self" type="application/rss+xml"/><item><title>Self-Hosted Multi-Modal Inference on One GPU</title><link>https://jdcsen.com/projects/llama-swap-stack/</link><pubDate>Thu, 01 Jan 1970 00:33:46 +0000</pubDate><guid>https://jdcsen.com/projects/llama-swap-stack/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;One OpenAI- and Anthropic-compatible endpoint fronting 36 model keys on a single RTX 5090 (32 GB): 14 LLM keys (Qwen3 coder, thinking and instruct tiers, a vision model, a captioner), 4 Whisper variants, 11 image generators (Flux, SDXL, Chroma, Qwen-Image), 4 Wan video models and 3 GPU feature-extraction sidecars.&lt;/li&gt;&#10;&lt;li&gt;Built on &lt;a href="https://github.com/mostlygeek/llama-swap" target="_blank"&gt;llama-swap&lt;/a&gt;, a Go router that starts and stops upstream inference processes on demand. Anything that speaks HTTP can be an upstream, which is what lets llama.cpp, whisper.cpp, a &lt;a href="https://jdcsen.com/projects/sdcpp-identity-server/"&gt;patched stable-diffusion.cpp&lt;/a&gt; and three PyTorch services share one card behind one API.&lt;/li&gt;&#10;&lt;li&gt;Co-residency is declared with set-algebra rules and eviction costs, but llama-swap does not measure VRAM, so I did: a sweep script that measures resident and peak footprints per model and per combination, which turned up a 6.7 GB transient VAE-decode spike as the binding constraint.&lt;/li&gt;&#10;&lt;li&gt;Every workhorse LLM has two keys: an exclusive full-context key and a co-resident &amp;ldquo;lite&amp;rdquo; twin, so a 256k-context 30B model and an image generator never fight for the card.&lt;/li&gt;&#10;&lt;li&gt;Heavy upstreams run as sibling containers launched on demand, so the router image rebuilds in seconds instead of recompiling sd-server and three multi-gigabyte venvs.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>stable-diffusion.cpp: Identity Conditioning in sd-server</title><link>https://jdcsen.com/projects/sdcpp-identity-server/</link><pubDate>Thu, 01 Jan 1970 00:33:46 +0000</pubDate><guid>https://jdcsen.com/projects/sdcpp-identity-server/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;Fork of &lt;a href="https://github.com/leejet/stable-diffusion.cpp" target="_blank"&gt;stable-diffusion.cpp&lt;/a&gt; adding per-request reference-image identity conditioning (PhotoMaker v2 on SDXL bases, PuLID on Flux) to the &lt;code&gt;sd-server&lt;/code&gt; HTTP surface. Upstream registered the flags but only the CLI ever populated them.&lt;/li&gt;&#10;&lt;li&gt;Eleven commits, about 1,900 lines added over 19 files. Roughly 89% lives in &lt;code&gt;examples/server/&lt;/code&gt;; the core engine changes total 87 lines. &lt;code&gt;sd-cli&lt;/code&gt; and the core library stay Python-free.&lt;/li&gt;&#10;&lt;li&gt;Reference-image encoding runs in-process through an embedded CPython interpreter (pybind11), behind two CMake flags that default to OFF so the vanilla build is unchanged.&lt;/li&gt;&#10;&lt;li&gt;Identity embeddings can be extracted once and re-injected: the round trip reproduces the image-path generation byte for byte at a fixed seed.&lt;/li&gt;&#10;&lt;li&gt;&amp;ldquo;No identity images&amp;rdquo; is proven to mean &amp;ldquo;no effect&amp;rdquo;: generations are md5-identical to the bare base model.&lt;/li&gt;&#10;&lt;li&gt;One upstream-worthy bug fix in core: an off-by-one in &lt;code&gt;clip_preprocess&lt;/code&gt; center-cropping that crashed any CLIP-vision path on odd input dimensions.&lt;/li&gt;&#10;&lt;/ul&gt;</description></item></channel></rss>