Skip to content
Vladimir Mandic edited this page Dec 17, 2023 · 16 revisions

Debug

To run SD.Next in debug mode, start it with --debug flag
This has no overhead and can be safely used in daily operations as it just prints additional information to logs

Example:

webui.bat --debug
webui.sh --debug

Extra Debug

Some debug information would be too much for regular use, so it can be enabled by use of environment variables:

  • SD_SCRIPT_DEBUG: increase verbosity of script and extension load and execution
  • SD_LORA_DEBUG: increase verbosity of LoRA loading and execution
  • SD_PASTE_DEBUG: report all params paste and parse operations as they happen
  • SD_PATH_DEBUG: report all used paths as they are parsed
  • SD_PROCESS_DEBUG: print detailed processing information
  • SD_HDR_DEBUG: print HDR processing information
  • SD_PROMPT_DEBUG: print all prompt parsing and encoding information
  • SD_EN_DEBUG: report all extra networks operations as they happen

Example:

set SD_PROCESS_DEBUG=true
webui.bat --debug

export SD_PROCESS_DEBUG=true
webui.sh --debug

Profiling

To run SD.Next in profiling mode, start it with --profile flag
This does have overhead, both on processing and memory side, so its not recommended for daily use
SD.Next will collect profiling information from both Python, Torch and CUDA and print it upon completion of specific operations

Example:

webui.bat --debug --profile
webui.sh --debug --profile

Clone this wiki locally