Heurist Miner

Windows Setup Guide

You can skip any of these steps if you already have the toolkits installed.

  • If you have installed Python 3.x, you possibly don't need to install Miniconda and latest Python again if you can handle the dependency installation in Step 5 and 7, but it's recommended that you still go through Step 2 and 3 to manage Python dependencies with Conda environment.
  • If you have installed CUDA before, you need to install the matching PyTorch version in Step 5 to work with your CUDA version.

Step 1. (Optional) Update GPU drivers

  1. Go to the NVIDIA Driver Downloads page.

  2. Select your GPU model and OS.

  3. Download and install the latest driver. Restart your PC if necessary.

Step 2. Install Miniconda

  1. Download the Miniconda Installer.
  • Visit the Miniconda Downloads page.
  • Get the latest Windows 64-bit version for Python 3.11. conda activate pytorch-gpu-python-3-10.

Step 3. Create a Conda Environment

  1. Open a command prompt (Win + X > “Command Prompt”).

  2. Create the Environment:

  • Type conda create --name gpu-3-11 python=3.11 (or choose your Python version).
  • Press Enter and wait for the process to finish.
  1. Activate the Environment
  • Type conda activate gpu-3-11

Step 4: Install CUDA Toolkit

  1. Download and Install CUDA:

Step 5: Install PyTorch with GPU Support

  1. Go to the PyTorch Install Page.
  • Set Your Preferences: Choose PyTorch, Conda, CUDA 12.1
  • Install PyTorch: Copy the generated command (like conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia). Paste it in the Command Prompt and hit Enter.

Step 6: Download Miner Scripts

  1. Run git clone https://github.com/heurist-network/miner-release in command prompt. Or Click "Code -> Download ZIP" in this Github repo - miner-release to download miner scripts.

Step 7: Install Dependencies from requirements.txt

  1. Open Your Command Prompt
  • Make sure you're still in your Conda environment. If not, activate it again with conda activate gpu-3-11
  1. Navigate to miner-release folder
  • Use the cd command to change directories to where requirements.txt is located. For example, cd C:\Users\YourUsername\Documents\miner-release.
  1. Install Dependencies:
  • Run the command pip install -r requirements.txt. This command tells pip (Python's package installer) to install all the packages listed in your requirements.txt file.

Step 8. Configure your Miner ID

  1. Locate config.toml in miner-release folder. Change miner_id_0 field to a unique ID like your Discord user name or Ethereum wallet address. This will help to identify your early contribution and give you rewards.
  2. If you have multiple GPUs, you must set num_cuda_devices to be the number of your NVIDIA cards, and set a unique miner_id for EACH GPU. Use miner_id_0 for the first GPU, miner_id_1 for the second, and so on.

If you use the same miner_id for multiple GPUs, the protocol will recognize you as one GPU. Make sure you set unique miner_id for each GPU to receive rewards correctly.

Step 9. Run the miner program

  1. Run python3 sd-miner-v0.0.1.py (select the latest version of file) in Conda environment command prompt.

  2. Type yes when the program prompts you to download model files. It will take a while to download all models. The program will start processing automatically once it completes downloading.

Congratulations! 🌟 You're now set to serve image generation requests. You don't need to keep it up 24/7. Feel free to close the program whenever you need your GPU like playing video games or streaming videos.