Skip to content
 
 

Repository files navigation

SDBXtext


Screenshot 2024-07-16 193141(1)

Tip

For best results, we recommend using Shadowbox with 3D graphics cards. Please ensure you have the current driver installed for your card. NVIDIA. AMD.

Windows

Typical Installation

  1. Download Python
  2. Check the Install for All Users and Add Python.exe to Path boxes in the installer
    • Install for All Users
    • Add python.exe to Path
  3. Confirm Python's installation . Hit Windows + R and write
    cmd /k where python && pause
    
    This command should print a line that says something similar to C:\Directory\Scripts\python.exe If not, ensure the entered/ command is identical, then reboot and try again, or repeat the install step, double-checking that the options are selected.
  4. Download Git
  5. In the installer, ensure the Git LFS box is marked
    • Git LFS (Large File Support)
  6. Set Git to be usable from Windows Command line
    • Git from the command line and also from 3rd-party software.
  7. Set the option to Use Windows' default console window
    • Use Windows' default console window
  8. Confirm the install by opening Command Prompt or Powershell. Hit Windows + R and write
    cmd /k where git && pause
    
    This should print a line that says something similar to C:\Program Files\Git\git.exe If not, check your spelling, reboot and try again, or repeat the install step, double-checking that the options are selected.
  9. While the terminal window is open, change the behavior of Command Prompt so it does not freeze when clicked:
    i. right click the Command Prompt title bar
    ii. choose Properties and uncheck the QuickEdit Mode box. Hit OK.
    • QuickEdit Mode

Please continue your installation by following the python instructions

Alternative Windows Subsystem for Linux Installation

Though more AI components are supporte by WSL, these benefits may not compensate for the performance loss of WSL. For the best experience, we recommend using Windows Manual Install instructions.
  1. Allow WSL through your firewall using Powershell with the following command in CMD:
    powershell New-NetFirewallRule -Program “%SystemRoot%\System32\wsl.exe” -Action Allow -Profile Domain, Private -DisplayName “Allow WSL” > -Description “Allow WSL” -Direction Outbound
    
  2. Enable Control Flow Guard
    powershell Set-ProcessMitigation -Name vmcompute.exe -Enable CFG
    
  3. OR
  4. ii. Download and Install Ubuntu LTS with Windows Subsystem for Linux from Command Line
    wsl --install -d Ubuntu --web-download
    
  5. Open WSL
    wsl
    
  6. Ensure Latest Python and Git
    sudo apt-get -y install python3 python3-venv python3-pip git
    
  7. Dedicate more system RAM by making a .wslconfig file. Follow these instructions from Microsoft
Next, choose your graphics card type below

NVIDIA

  1. i. Get NVIDIA keys
    wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
    

    OR

  2. ii. Add NVIDIA to your repository sources
    sudo 'echo "http://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
    
  3. Install Key
    sudo dpkg -i cuda-keyring_1.1-1_all.deb
    
  4. Install CUDA-TOOLKIT
    sudo apt-get -y install cuda-toolkit-12-5
    

AMD

  • Please bear with us, We have yet to test this. If you would like to discuss this documentation, add an Issue at the top menu of the page.

Please continue your Windows Subsystem for Linux installation by following the linux instructions

    1. Homebrew users can open Terminal and enter:
    brew install python
    
    then follow the Python instructions.
    1. App Store users - Install Xcode

  1. Open Terminal and enter the following:
    xcode-select --install
    

Note

Linux users should update and upgrade repository

- WSL/Ubuntu/Debian:
sudo apt-get -y update & sudo apt-get -y upgrade
- Redhat/Fedora:
sudo dnf update & sudo dnf upgrade
- Arch:
sudo pacman -Syu

Important

Do not use the same virtual environment as an existing ComfyUI installation.

Tip

We recommend running this command from an easy to remember location while avoiding /home, /Program Files, /Windows, and other protected directories.

python3 -m venv .venv

  1. Activate the environment

    - Windows
    .venv\Scripts\activate
    
    - Linux, MacOS and WSL
    source .venv/bin/activate
    

  2. Install PyTorch

    - NVIDIA:
    pip3 install torch==2.3.0+cu121 torchvision torchaudio --index-url=https://download.pytorch.org/whl/cu121
    
    - AMD Linux:
    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/rocm6.0
    
    - AMD Windows:
    pip install torch-directml
    
    - MacOS/CPU:
    pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
    

  1. Once PyTorch and Friends are installed, run this command to install Shadowbox to your current directory.

     git clone https://github.com/darkshapes/sdbx.git
    
    Anticipated functionality of ComfyUI will also allow you to run Singularity from command line.

  2. Install the last requirements

    cd sdbx
    pip install -r <(sed '/^[torch|torchaudio]/d' requirements.txt)
    

  3. [07/16/24 Hotfix] Remove /comfy/web folder, then place these folders inside the /sdbx root directory singularity-20240716.zip

  4. Launch Shadowbox

    python main.py --output-directory /YOUR_FOLDER_NAME --input-directory /YOUR_FOLDER_NAME/input
    
    AMD DIRECTML
    python main.py --directml --output-directory /YOUR_FOLDER_NAME --input-directory /YOUR_FOLDER_NAME/input
    
    OLDER COMPUTERS
    python main.py --force-fp16 --output-directory /YOUR_FOLDER_NAME --input-directory /YOUR_FOLDER_NAME/input
    

  5. Open your browser to 127.0.0.1:8188

Done!

  • Linux/WSL Developer Notes
  • Install build tools. WSL users should run in a Visual Studio Code prompt environment.
    pip install packaging wheel ninja
    
  • Install xformers
    pip install xformers==0.0.26.post1
    

  • Install flash-attention
    pip install flash-attn --no-build-isolation
    

Lets create a more inviting and visually-pleasing ComfyUI using Typescript and ReactFlow!

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages