NeuroAgent

Stable Diffusion Images Not Showing: How to Fix

Fix for Stable Diffusion: Images are generated but not displayed and no output folder is created. Step-by-step instructions for creating folders and configuring launch parameters with --skip-torch-cuda-test --use-cpu all flags.

Question

Stable Diffusion generates images but doesn’t show the result? Stable Diffusion generates images but doesn’t display them, and there’s no output folder. There was a problem during installation, so I used the flags --skip-torch-cuda-test --use-cpu all. Stable Diffusion loads, but images aren’t created and there’s no output folder. How do I fix this error?

NeuroAgent

Stable Diffusion generates images but doesn’t display them and doesn’t create an output folder when using --skip-torch-cuda-test --use-cpu all flags, usually due to path configuration issues or output settings. To solve this problem, you need to check the output directory settings, create necessary folders manually or use symbolic links, and configure startup parameters correctly. Main solutions include changing parameters in webui-user.bat, checking folder access permissions, and using correct save paths.

Table of Contents

Main causes of the problem

When Stable Diffusion uses the --skip-torch-cuda-test --use-cpu all flags, it indicates issues with GPU acceleration, and the system switches to CPU mode. However, this can cause several problems:

Path saving issues: By default, Stable Diffusion expects the outputs folder to be created in the installation directory, but under certain conditions, this folder may not be created automatically.

Access permission issues: When running as a user without administrative rights, errors may occur when creating folders in system directories.

Configuration conflicts: The --skip-torch-cuda-test --use-cpu all flags may change system behavior, affecting the result saving process.

Important: According to research on Reddit, many users encounter situations where images are generated but not displayed in the interface, while physically the files are saved in other directories, such as session folders.

Solving the missing output folder issue

Manually creating the outputs folder

  1. Open File Explorer and navigate to the Stable Diffusion installation directory
  2. Create a folder named outputs
  3. Inside outputs, create subfolders:
    • txt2img-samples
    • img2img-samples
    • extras-samples
bash
# Example folder structure:
stable-diffusion-webui/
├── outputs/
│   ├── txt2img-samples/
│   ├── img2img-samples/
│   └── extras-samples/

Using symbolic links

If you want to store images on another drive, use symbolic links:

cmd
# In Windows command prompt:
mklink /D "C:\stable-diffusion-webui\outputs" "D:\SD\outputs"

This will keep the outputs folder in the main directory but physically store the files on another drive.

Startup settings with --skip-torch-cuda-test and --use-cpu flags

Correct webui-user.bat configuration

Open the webui-user.bat file in a text editor and add the following parameters:

cmd
@echo off
set COMMANDLINE_ARGS=--skip-torch-cuda-test --use-cpu all --medvram
call webui.bat

Important: Using the --medvram flag can help when working with CPU, especially if you have limited RAM.

Alternative startup parameters

If the problem persists, try other flag combinations:

cmd
set COMMANDLINE_ARGS=--skip-torch-cuda-test --use-cpu all --lowvram --precision full --no-half

These parameters can help stabilize the system when GPU acceleration is not available.

Checking and creating necessary folders

Automatic folder creation via Python

You can create a small script to automatically create the necessary folders:

python
import os
import sys

# Paths for folder creation
base_path = os.path.dirname(os.path.abspath(__file__))
output_paths = [
    os.path.join(base_path, 'outputs', 'txt2img-samples'),
    os.path.join(base_path, 'outputs', 'img2img-samples'),
    os.path.join(base_path, 'outputs', 'extras-samples'),
    os.path.join(base_path, 'log'),
]

# Create folders
for path in output_paths:
    os.makedirs(path, exist_ok=True)
    print(f'Created folder: {path}')

print('All necessary folders created successfully!')

Save this script as create_folders.py in the root directory of Stable Diffusion and run it before launching the main application.

Checking access permissions

Make sure your user has write permissions to the installation directory:

  1. Right-click on the Stable Diffusion folder
  2. Select “Properties” → “Security”
  3. Ensure your user has “Full control” permissions

Alternative solution methods

Using Docker

If you’re familiar with Docker, you can try running Stable Diffusion in a container:

bash
docker run --gpus all -p 7860:7860 --name stable-diffusion --rm -v ~/stable-diffusion-webui:/stable-diffusion-webui vladmandic/automatic:latest

Reinstalling with correct parameters

If nothing helps, try reinstalling Stable Diffusion with correct parameters:

  1. Delete the current installation directory
  2. Download a fresh version from GitHub
  3. Before launching, manually create all necessary folders
  4. Launch with correct parameters in webui-user.bat

Checking configuration in the interface

  1. Open the Stable Diffusion interface
  2. Go to settings (Settings)
  3. Check the path in the “Output directory for txt2img images” field
  4. Ensure the path is correctly specified

Diagnosis and additional checks

Checking logs

Check the startup logs in the command prompt or in the log\.txt file. There may be useful error messages.

Checking disk space

Ensure there is enough free space on the drive where Stable Diffusion is installed (recommended at least 10 GB).

Checking antivirus

Sometimes an antivirus blocks folder creation or file writing. Try temporarily disabling the antivirus for testing.

Updating dependencies

Make sure all dependencies are installed correctly:

bash
pip install --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu

Conclusion

  • The main cause of the problem is the absence of the automatically created outputs folder when running with CPU flags, which is solved by manually creating the necessary directories.

  • Correct configuration of the webui-user.bat file with parameters --skip-torch-cuda-test --use-cpu all --medvram helps stabilize the system.

  • Symbolic links allow storing images on other drives while maintaining the folder structure in the main directory.

  • Automating folder creation via a Python script prevents the problem from occurring in the future.

  • If the problem persists, check access permissions, free disk space, antivirus settings, and update all dependencies to the latest versions.

To prevent similar problems in the future, it’s recommended to regularly check for the presence of necessary folders and follow Stable Diffusion updates, as developers constantly improve the system for working with save paths.

Sources

  1. r/StableDiffusion on Reddit: HELP!! I can’t seem to find the outputs folder with my generated pictures
  2. r/StableDiffusion on Reddit: Stable_diffusion GUI not working
  3. GitHub Issue: Output image does not display on latest commit
  4. GitHub Issue: Unable to Display Generated Images on the Page
  5. Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable
  6. r/StableDiffusion on Reddit: Brand new to Stable Diffusion, I keep getting an error
  7. Stack Overflow: How to solve “Torch is not able to use GPU” error