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.
-
Go to the NVIDIA Driver Downloads page.
-
Select your GPU model and OS.
-
Download and install the latest driver. Restart your PC if necessary.
- 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.
-
Open a command prompt (Win + X > “Command Prompt”).
-
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.
- Activate the Environment
- Type
conda activate gpu-3-11
- Download and Install CUDA:
- Visit the CUDA Toolkit 12.1 download page.
- Select your OS version.
- Download and install it by following the prompts.
- 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.
- 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.
- Open Your Command Prompt
- Make sure you're still in your Conda environment. If not, activate it again with
conda activate gpu-3-11
- 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
.
- 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.
- Locate
config.toml
inminer-release
folder. Changeminer_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. - 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. Useminer_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.
-
Run
python3 sd-miner-v0.0.1.py
(select the latest version of file) in Conda environment command prompt. -
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.