Stable Diffusion Transparent Background PNG (2026)

Not natively. Base Stable Diffusion - SDXL, SD 3.x, SD 3.5 - outputs flat RGB with no alpha channel, so there is no transparency in a stock render. There is one genuine exception: the LayerDiffuse extension produces real alpha, but it only supports SD 1.5 and SDXL, needs a local install with extra model files, and is fiddly to dial in.

For everyone else - anyone on SD 3.5, a cloud generator, or who just wants clean soft edges without tuning an extension - the reliable method is alpha recovery: render the same image on white and on black, then compare them. Transparify does this in your browser, for free.

LayerDiffuse: Real Alpha, With Caveats

Credit where it is due: LayerDiffuse (latent transparency) is the real thing. It uses a transparent VAE so the decoder reconstructs a genuine RGBA image - actual alpha, generated in one pass, not a background removal afterward. It handles hard cases like glass, glow, and hair well, and in the original paper users preferred it over generate-then-matte the vast majority of the time.

The limitations matter, though:

  • It supports SD 1.5 and SDXL only - not SD 3 / SD 3.5, and not Flux.
  • It needs a local setup (Forge or ComfyUI) plus extra model downloads, and it is still officially flagged work-in-progress.
  • Generation dimensions must be a multiple of 64 or the RGBA decode fails, some samplers introduce artifacts, and foreground colors can drift.

If you already run local SDXL and enjoy tinkering, LayerDiffuse is excellent. If not, the white/black method below gets you a true alpha PNG from any Stable Diffusion version - no extension, no model files, no GPU required.

The Alpha Recovery Technique

Alpha recovery calculates the exact opacity of every pixel by comparing two renders of the same image - one on white, one on black. A fully opaque pixel looks identical on both; a fully transparent pixel shows the maximum difference; a semi-transparent pixel lands in between, revealing its precise alpha.

The key to making it work with Stable Diffusion is consistency between the two renders - which is easy, because you control the seed, sampler, and CFG scale. Keep all of them fixed and change only the background color, and the subject stays pixel-aligned.

Step-by-Step: Stable Diffusion to Transparent PNG

Step 1 - Generate the white version

Render your image on a pure white background. Lock the seed, sampler, and CFG so you can reproduce them exactly.

"a glowing crystal shard with light refractions, on a pure white background" (fixed seed, sampler, CFG)

Step 2 - Generate the black version

Run again with the same seed, sampler, and CFG scale, changing only "white" to "black" in the prompt. If you need extra consistency, use img2img from the white render with a low denoising strength.

"a glowing crystal shard with light refractions, on a pure black background" (same seed, sampler, CFG)

Step 3 - Process with Transparify

  1. Go to transparify.app
  2. Upload the white-background image and the black-background image
  3. Use the before/after slider to verify the transparency looks correct
  4. If the images were swapped, click the swap button to fix them
  5. Download as PNG (lossless) or WebP (smaller file size)

Everything runs locally in your browser - your images are never uploaded to a server.

Try it now - free, no signup required

Open Transparify

Tips for Best Results

  1. Fix the seed, sampler, and CFG scale across both renders. Only the background color should change.
  2. Use img2img for stubborn subjects. Generating the black version from the white render at low denoising keeps the composition locked.
  3. Say "pure white" / "pure black" to avoid off-white or dark-grey backgrounds that reduce accuracy.
  4. Choose alpha recovery over LayerDiffuse when you are on SD 3.5, working in the cloud, or want guaranteed clean soft edges without per-sampler tuning.
  5. Avoid "transparent" in the prompt - it tends to produce a painted checkerboard, which is just opaque pixels.

Frequently Asked Questions

Does Stable Diffusion support transparent backgrounds?

Not in the base models (SDXL, SD 3.5). The LayerDiffuse extension produces real alpha, but it supports only SD 1.5 and SDXL and needs a local setup.

What is the best way to get a transparent PNG from Stable Diffusion?

If you run local SDXL, LayerDiffuse works well. Otherwise, render on white and on black with the same seed, sampler, and CFG, and recover the alpha channel with Transparify.

Does LayerDiffuse give a real alpha channel?

Yes - it uses a transparent VAE to generate genuine RGBA, not a background removal. But it is finicky, still work-in-progress, and limited to SD 1.5 and SDXL.

Ready to make your Stable Diffusion images transparent?

Try Transparify Free