topology-gg/DiffusionPythonBot
topology-gg/DiffusionPythonBot has 30 GitHub stars and 2 forks. Star changes are not measured yet. Last checked 2026-11-14 04:58 UTC. Last push 2026-09-10.
What you can do
- Generate images locally using PyTorch via the !generate command
- Generate images by pinging the bot as a @mention and sending an embedded file, it will run img2img
- Images are hosted by the imgur API, allowing for a 25MiB file size for images instead of the default 8M for Discord
- Configuration settings can be found in config/config.json, which can be copied from ...config/example.json from the same directory
측정된 스타 증가
- in 24h
- 기록 수집 중
- in 7 days
- 기록 수집 중
- in 15 days
- 기록 수집 중
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
A simple Python Discord bot that generates images with Stable Diffusion through a local pipeline - img2img, progress reporting, and a model registry.
머신러닝README.md
OriginalA Basic PyTorch Discord Bot
This project is used for a Python-based Discord bot that can generate images locally using PyTorch via the !generate command. By pinging it as a @mention and sending an embedded file, it will run img2img. It's rather basic, and really just a learning experience on interacting with PyTorch and Discord, to polish async development and Python skills.
Features
- Generate images locally using PyTorch via the
!generatecommand - Generate images by pinging the bot as a @mention and sending an embedded file, it will run img2img
- Images are hosted by the imgur API, allowing for a 25MiB file size for images instead of the default 8M for Discord
- Configuration settings can be found in
config/config.json, which can be copied from...config/example.jsonfrom the same directory
Getting Started
- Clone the repository
- Install dependencies using
pip install -r requirements.txt - Copy the example configuration file
config/example.jsontoconfig/config.jsonand modify the settings as necessary. Be sure to acquire and fill in all of the API tokens, or it likely won't work. - Configure whether you'd like to use attention scaling to cut down on GPU memory use, at the cost of generation time. This is a very slow process, so, it might be worthwhile to limit the maximum resolution you're using, instead.
- Configure the maximum resolution for each aspect ratio you'll be serving. This is a bot-specific configuration, so that you can have multiple systems on one Discord server all generating images at different levels of quality, suitable to the local hardware.
- Run the bot using
poetry run bot
Commands
!generate
Generates an image on the bot's hardware using PyTorch. Syntax: !generate <prompt>
Example: !generate "A beautiful sunset over the mountains"
@mention + embedded file
Generates an image using img2img when the bot is pinged and an image is embedded in the message. It's not great. Any improvement to the Dreambooth functionality is welcome.
Hosting
The bot can be hosted on a server with Python installed, such as AWS or Google Cloud Platform. It is recommended to use a process manager such as systemd or PM2 to manage the bot's processes.
Contributing
Contributions to the project are welcome! Please submit pull requests or issues to the project's GitHub repository.
License
This project is released as GPL3. I only ask that contributions be made available to others to learn from.
관련 프로젝트 살펴보기
tensorflow/tensorflow
모두를 위한 오픈소스 머신러닝 프레임워크
201,592 스타huggingface/transformers
🤗 Transformers: 텍스트, 비전, 오디오, 멀티모달 분야의 최첨단 머신러닝 모델을 위한 모델 정의 프레임워크로, 추론과 학습을 모두 지원합니다.
168,954 스타AUTOMATIC1111/stable-diffusion-webui
Stable Diffusion 웹 UI
165,306 스타Comfy-Org/ComfyUI
그래프와 노드로 구성된 인터페이스를 갖춘, 가장 강력하고 모듈성이 뛰어난 확산 모델 GUI, API, 백엔드입니다. 세계에서 가장 빠른 로컬 추론 엔진입니다.
146,721 스타