{"id":2346,"date":"2026-07-28T11:14:11","date_gmt":"2026-07-28T11:14:11","guid":{"rendered":"https:\/\/ukspeed.co.uk\/blog\/?p=2346"},"modified":"2026-07-28T12:01:04","modified_gmt":"2026-07-28T12:01:04","slug":"self-host-stable-diffusion-flux-uk-gpu-vps-2026","status":"publish","type":"post","link":"https:\/\/ukspeed.co.uk\/blog\/self-host-stable-diffusion-flux-uk-gpu-vps-2026\/","title":{"rendered":"Stable Diffusion &amp; FLUX on UK GPU VPS: Self-Hosted Image Generation Setup Guide 2026"},"content":{"rendered":"<p>You can now self-host Stable Diffusion and FLUX on a single UK GPU VPS, keeping every prompt and generated image on hardware you control. Generative image models have moved from cloud APIs to your own hardware, and the tooling is finally mature enough to run them reliably in production. This guide shows UK developers, startups, designers, and agencies how to <strong>self-host Stable Diffusion and FLUX<\/strong> on a UK GPU VPS using ComfyUI, from picking the right amount of VRAM to running FLUX.1 and SDXL models, tuning speed, and locking the whole thing down. The result is fast, private, on-demand image generation you own end to end.<\/p>\n\n<h2 class=\"wp-block-heading\">What Is Stable Diffusion and FLUX?<\/h2>\n\n<p>Stable Diffusion is a family of open-source latent diffusion models that turn text prompts into images. It works by progressively removing noise in a compressed &#8220;latent&#8221; space, which keeps memory use low enough to run on consumer and data-centre GPUs alike. The main lineage matters when you choose a model: SD 1.5 is light and older, SDXL produces much higher quality at around 1024px, and SD3 \/ SD3.5 are the newest releases with improved text rendering and composition.<\/p>\n\n<p>FLUX.1, released by Black Forest Labs, is a newer generation of text-to-image model that pushes state-of-the-art quality and prompt adherence. Where older Stable Diffusion checkpoints sometimes drift from the prompt, FLUX tends to follow complex instructions and render legible text more faithfully. It comes in several variants aimed at different needs, which we cover in the comparison below. Together, Stable Diffusion and FLUX give you an open, self-hostable stack that rivals commercial image APIs.<\/p>\n\n<h2 class=\"wp-block-heading\">Why Self-Host Image Generation<\/h2>\n\n<h3 class=\"wp-block-heading\">When to Self-Host Stable Diffusion and FLUX<\/h3>\n\n<p>You should self-host Stable Diffusion when prompts, source images and generated output must stay on UK infrastructure, when per-image API fees stack up at volume, or when you need full control over models, LoRAs and custom pipelines that hosted services lock down. Running your own GPU VPS means the whole self-host Stable Diffusion and FLUX workflow &mdash; from the checkpoint to the final PNG &mdash; never leaves a server you control.<\/p>\n\n<p>Paid image APIs are convenient, but they bill per image and send your prompts and outputs to a third party. For teams handling client briefs, unreleased product shots, or sensitive concepts, that is a real privacy and compliance concern. Self-hosting keeps everything on infrastructure you control.<\/p>\n\n<ul class=\"wp-block-list\"><li><strong>Privacy and UK data residency:<\/strong> prompts and generated images never leave your server, which simplifies GDPR obligations and keeps client work confidential.<\/li><li><strong>No per-image fees:<\/strong> once the VPS is running, generation cost is flat and predictable regardless of volume \u2014 a decisive advantage at scale.<\/li><li><strong>Full control:<\/strong> you choose the exact models, add LoRAs and fine-tunes, and build custom pipelines instead of being limited to a vendor&#8217;s menu.<\/li><li><strong>Commercial certainty:<\/strong> with the right licence you can generate for paid client work without surprise usage caps.<\/li><\/ul>\n\n<p>The same logic that drives teams to <a href=\"https:\/\/ukspeed.co.uk\/blog\/ollama-uk-gpu-vps-self-host-llama-mistral-qwen-production-2026\/\">self-host LLMs like Llama, Mistral, and Qwen on a UK GPU VPS<\/a> applies to images. If you are weighing the trade-offs more broadly, our guide on <a href=\"https:\/\/ukspeed.co.uk\/blog\/self-hosted-ai-vs-cloud-ai-platforms-which-is-better-for-startups-in-2026\/\">self-hosted AI versus cloud AI platforms<\/a> is a useful companion. The freedom to run open workflows also carries a responsibility to filter misuse, which we return to in best practices.<\/p>\n\n<h2 class=\"wp-block-heading\">Stable Diffusion vs FLUX: Which to Use<\/h2>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/ukspeed.co.uk\/blog\/wp-content\/uploads\/2026\/07\/sd1-vs-flux.svg\" alt=\"Self-host Stable Diffusion vs FLUX.1 on a UK GPU VPS compared on licensing, quality and VRAM\" class=\"wp-image-2347\" \/><figcaption class=\"wp-element-caption\">Stable Diffusion has the bigger ecosystem and LoRAs; FLUX.1 leads on quality \u2014 schnell is Apache-licensed and fast, dev is non-commercial.<\/figcaption><\/figure>\n\n\n<p>There is no single winner \u2014 the right choice depends on quality needs, speed, VRAM, and licensing. FLUX generally leads on raw quality and prompt adherence; Stable Diffusion has a vast ecosystem of LoRAs, fine-tunes, and community tooling. Licensing is the detail that catches teams out, so read it carefully before any commercial use.<\/p>\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Model<\/th><th>Quality \/ strengths<\/th><th>Approx. VRAM<\/th><th>Licence<\/th><\/tr><\/thead><tbody><tr><td>SD 1.5<\/td><td>Light, fast, huge LoRA ecosystem; lower fidelity<\/td><td>~4\u20136GB<\/td><td>Open (CreativeML)<\/td><\/tr><tr><td>SDXL<\/td><td>High quality ~1024px, mature tooling<\/td><td>~8\u201312GB<\/td><td>Open<\/td><\/tr><tr><td>SD3 \/ 3.5<\/td><td>Better text and composition<\/td><td>~10\u201316GB<\/td><td>Stability community licence<\/td><\/tr><tr><td>FLUX.1 [schnell]<\/td><td>Very fast (~1\u20134 steps), strong quality<\/td><td>~12GB with fp8\/GGUF<\/td><td>Apache-2.0 (commercial OK)<\/td><\/tr><tr><td>FLUX.1 [dev]<\/td><td>Highest fidelity (~20\u201350 steps)<\/td><td>~24GB fp16, ~12GB quantised<\/td><td>Non-commercial<\/td><\/tr><tr><td>FLUX.1 [pro]<\/td><td>Top quality, closed<\/td><td>API only<\/td><td>Closed \/ API<\/td><\/tr><\/tbody><\/table><\/figure>\n\n<p>A practical rule of thumb: choose <strong>FLUX.1 [schnell]<\/strong> when you need commercially safe, fast generation; <strong>FLUX.1 [dev]<\/strong> for the highest fidelity in internal or non-commercial work; and <strong>SDXL<\/strong> when you want a huge library of community fine-tunes and LoRAs. Many teams run more than one, switching per job.<\/p>\n\n<h2 class=\"wp-block-heading\">How to Choose a GPU VPS for Image Generation<\/h2>\n\n<p>VRAM is the constraint that decides which models you can run. Everything else \u2014 CUDA cores, memory bandwidth \u2014 affects speed, but if a model does not fit in VRAM it simply will not load without quantisation. Use this as a rough sizing guide:<\/p>\n\n<ul class=\"wp-block-list\"><li><strong>SD 1.5:<\/strong> comfortable on ~4\u20136GB, viable even on modest GPUs.<\/li><li><strong>SDXL:<\/strong> ~8\u201312GB for smooth 1024px generation with headroom.<\/li><li><strong>FLUX.1 [dev] full fp16:<\/strong> around 24GB, but runs on roughly 12GB using fp8 or GGUF quantisation.<\/li><li><strong>FLUX.1 [schnell]:<\/strong> lighter and fast, a good fit for mid-range cards.<\/li><\/ul>\n\n<p>A 24GB GPU is the practical sweet spot: an NVIDIA L4 or RTX 4090-class card handles quantised FLUX and SDXL comfortably, while an L40S with 48GB gives generous headroom for batching, larger resolutions, or running multiple models. For the wider trade-offs between data-centre cards, see our breakdown of <a href=\"https:\/\/ukspeed.co.uk\/blog\/nvidia-h100-vs-a100-vs-l40s-gpu-vps-llm-training-inference-2026\/\">H100 vs A100 vs L40S GPU VPS options<\/a>. UK Speed&#8217;s UK GPU VPS plans keep this hardware inside British data centres, which matters for the data-residency benefits above. If you are planning wider AI infrastructure, our guide to the <a href=\"https:\/\/ukspeed.co.uk\/blog\/best-hosting-for-ai-startups-in-2026-complete-guide-to-scalable-ai-infrastructure\/\">best hosting for AI startups<\/a> covers scaling beyond a single node.<\/p>\n\n<h2 class=\"wp-block-heading\">How to Install ComfyUI on UK GPU VPS<\/h2>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/ukspeed.co.uk\/blog\/wp-content\/uploads\/2026\/07\/sd2-comfyui.svg\" alt=\"ComfyUI node graph workflow for FLUX text-to-image generation on a UK GPU VPS\" class=\"wp-image-2349\" \/><figcaption class=\"wp-element-caption\">A ComfyUI workflow: model \u2192 prompt encode \u2192 KSampler \u2192 VAE decode \u2192 image. Reach it only via SSH tunnel or an authenticated proxy.<\/figcaption><\/figure>\n\n\n<p>ComfyUI is a node- and graph-based interface and the preferred tool for FLUX and efficient low-VRAM workflows, with native support for fp8 and GGUF quantised models. AUTOMATIC1111 and its Forge fork remain the classic WebUI choice for Stable Diffusion, so mention both to your team \u2014 but for FLUX we recommend ComfyUI. Start by provisioning a UK GPU VPS with recent NVIDIA drivers and CUDA installed, then set up a clean Python environment.<\/p>\n\n<pre class=\"wp-block-code\"><code># Verify the GPU and driver are visible\nnvidia-smi\n\n# Clone ComfyUI and create an isolated environment\ngit clone https:\/\/github.com\/comfyanonymous\/ComfyUI\ncd ComfyUI\npython3 -m venv venv\nsource venv\/bin\/activate\n\n# Install the correct PyTorch CUDA build, then ComfyUI deps\npip install torch torchvision --index-url https:\/\/download.pytorch.org\/whl\/cu124\npip install -r requirements.txt<\/code><\/pre>\n\n<p>Bind ComfyUI to localhost and reach it over an SSH tunnel \u2014 never expose the raw port to the internet:<\/p>\n\n<pre class=\"wp-block-code\"><code># On the server: start ComfyUI on localhost only\npython main.py --listen 127.0.0.1 --port 8188\n\n# On your laptop: forward the port over SSH\nssh -L 8188:127.0.0.1:8188 user@your-vps-ip\n# then open http:\/\/127.0.0.1:8188 in your browser<\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">How to Run FLUX and SDXL Models<\/h2>\n\n<p>Models are not bundled with ComfyUI \u2014 you download the weights and drop them into the correct subfolders. SDXL checkpoints are single files that live in <code>ComfyUI\/models\/checkpoints<\/code>. FLUX is split across components: the main model goes in <code>models\/unet<\/code>, the text encoders in <code>models\/clip<\/code>, and the VAE in <code>models\/vae<\/code>. Always pull weights from the official source. The authoritative FLUX repository is <a href=\"https:\/\/huggingface.co\/black-forest-labs\" rel=\"noopener\" target=\"_blank\">Black Forest Labs on Hugging Face<\/a>, where the licence for each variant is stated clearly.<\/p>\n\n<pre class=\"wp-block-code\"><code># SDXL checkpoint\nwget -P models\/checkpoints https:\/\/huggingface.co\/&lt;org&gt;\/&lt;sdxl-model&gt;\/resolve\/main\/sd_xl_base_1.0.safetensors\n\n# FLUX components (example paths)\nwget -P models\/unet  https:\/\/huggingface.co\/black-forest-labs\/&lt;flux-model&gt;\/resolve\/main\/flux1-schnell.safetensors\nwget -P models\/clip  https:\/\/huggingface.co\/&lt;org&gt;\/&lt;clip&gt;\/resolve\/main\/t5xxl_fp8.safetensors\nwget -P models\/vae   https:\/\/huggingface.co\/black-forest-labs\/&lt;flux-model&gt;\/resolve\/main\/ae.safetensors<\/code><\/pre>\n\n<p>In ComfyUI, load a FLUX or SDXL example workflow, point the loader nodes at your files, enter a prompt, and queue the generation. Step counts differ sharply by model: FLUX.1 [schnell] produces good results in roughly 4 steps, while FLUX.1 [dev] and SDXL want 20\u201330+ steps for full fidelity. Before using any output commercially, confirm the licence \u2014 schnell is Apache-2.0 and commercially permissive, whereas dev is released under a non-commercial licence.<\/p>\n\n<h2 class=\"wp-block-heading\">Optimize VRAM and Generation Speed<\/h2>\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/ukspeed.co.uk\/blog\/wp-content\/uploads\/2026\/07\/sd3-vram.svg\" alt=\"VRAM requirements for SD 1.5, SDXL and FLUX.1, and how fp8\/GGUF quantisation reduces them\" class=\"wp-image-2351\" \/><figcaption class=\"wp-element-caption\">Generation sets the VRAM budget: a 24GB GPU runs everything, and fp8\/GGUF quantisation fits FLUX.1 dev on about 12GB.<\/figcaption><\/figure>\n\n\n<p>If FLUX will not fit or generation feels slow, a handful of levers make a large difference. Most teams combine two or three of these to hit their target throughput on a single card.<\/p>\n\n<ul class=\"wp-block-list\"><li><strong>Quantise:<\/strong> use fp8 or GGUF FLUX builds to fit ~24GB models into roughly 12GB of VRAM with minimal quality loss.<\/li><li><strong>Memory flags:<\/strong> launch with <code>--lowvram<\/code> or <code>--medvram<\/code> so ComfyUI offloads parts of the model when VRAM is tight.<\/li><li><strong>Attention backends:<\/strong> enable xformers or the built-in PyTorch attention to cut memory use and speed up sampling.<\/li><li><strong>Right-size steps and scheduler:<\/strong> do not run schnell at 30 steps \u2014 around 4 is enough. Match the scheduler to the model.<\/li><li><strong>torch.compile:<\/strong> compiling the model can meaningfully raise throughput for repeated generations.<\/li><li><strong>Fast storage:<\/strong> keep checkpoints on NVMe so multi-gigabyte models load quickly, and batch images to amortise setup cost.<\/li><\/ul>\n\n<p>These techniques mirror the inference tuning used in other GPU workloads, such as building a <a href=\"https:\/\/ukspeed.co.uk\/blog\/self-host-rag-pipeline-uk-gpu-vps-ollama-qdrant-langchain-2026\/\">self-hosted RAG pipeline on a UK GPU VPS<\/a>, where fitting models into available VRAM is equally decisive.<\/p>\n\n<h2 class=\"wp-block-heading\">Best Practices for Self-Hosted Image Generation<\/h2>\n\n<p>A working ComfyUI install is the start, not the finish. To run it as a dependable service, harden access and automate the operational basics.<\/p>\n\n<ul class=\"wp-block-list\"><li><strong>Never expose ComfyUI unauthenticated.<\/strong> Put an Nginx reverse proxy with HTTP auth (or a VPN) in front, or restrict access to an SSH tunnel. The web UI has no built-in authentication.<\/li><li><strong>Run it as a service.<\/strong> Wrap ComfyUI in a systemd unit so it restarts on failure and survives reboots.<\/li><li><strong>Monitor the GPU.<\/strong> Track VRAM use and temperatures with <code>nvidia-smi<\/code> or a dashboard so you catch thermal throttling and out-of-memory errors early.<\/li><li><strong>Respect licences.<\/strong> Keep a record of which model produced each asset; use schnell or SDXL for commercial output and treat dev as non-commercial unless you hold a separate agreement.<\/li><li><strong>Add content safety.<\/strong> Any public-facing generator needs input and output filtering to prevent misuse \u2014 self-hosting removes the vendor&#8217;s guardrails, so you provide your own.<\/li><\/ul>\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n<p>Self-hosting image generation gives you private, predictable, and fully controllable creative infrastructure. With a 24GB-class GPU, ComfyUI, and the right FLUX or Stable Diffusion model, a small team can match commercial APIs on quality while keeping every prompt and image on UK soil. The key decisions are VRAM sizing, model licensing, and locking down access.<\/p>\n\n<ul class=\"wp-block-list\"><li>Provision a UK GPU VPS with ~24GB VRAM (L4 or RTX 4090-class; L40S for headroom).<\/li><li>Install ComfyUI in a venv and reach it only via SSH tunnel or an authenticated proxy.<\/li><li>Start with FLUX.1 [schnell] for fast, commercially safe results; add SDXL for LoRAs.<\/li><li>Quantise, tune steps, and run as a systemd service before going to production.<\/li><\/ul>","protected":false},"excerpt":{"rendered":"<p>You can now self-host Stable Diffusion and FLUX on a single UK GPU VPS, keeping every prompt and generated image on hardware you control.\u2026<\/p>\n","protected":false},"author":3,"featured_media":2356,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[33],"tags":[61,145,113,136,140],"class_list":["post-2346","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps-hosting","tag-hosting","tag-nvme","tag-performance","tag-ssl","tag-vps"],"_links":{"self":[{"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2346"}],"version-history":[{"count":5,"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2346\/revisions"}],"predecessor-version":[{"id":2354,"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2346\/revisions\/2354"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/media\/2356"}],"wp:attachment":[{"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ukspeed.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}