- Install python-telegram bot
pip install python-telegram-bot --pre
- Install requirements (if you are using Colab)
%cd stable-diffusion
pip install -r requirements.txt
or create conda env (if you are running locally)
conda env create -f environment.yaml
conda activate ldm
- Run
python3 scripts/preload_models.py
- Create file configs.py and paste
TELEGRAM_API_TOKEN = 'YOUR TOKEN'
- (Optional) Download Stable-Diffusion checkpoint Go to https://huggingface.co/CompVis/stable-diffusion-v-1-4-original and download sd-v1-4.ckpt . Place it in models/ldm/stable-diffusion-v1 .
WARNING: If sd-v1-4.ckpt wasns't downloaded the bot always will return the same test image.
- Run telegram bot
python bot_main.py