Skip to content

StableDiffusion图片生成电报机器人(HuggingFace接口)

Notifications You must be signed in to change notification settings

slippersheepig/StableDiffusion-Telegram-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

搭配Hugging Face使用的图片生成机器人

Tip

需注册Hugging Face账号,在个人信息profile处点击settings-access tokens生成api复制备用

Note

该代码仅兼容StableDiffusion模型,其他模型未测试

.env

HUGGINGFACE_TOKEN=hf_ABCDEFGHIJKLMNOPQRSTUVWXYZ
BOT_TOKEN=123456789:abcdefghijklmnopqrstuvwxyz
API_URL=https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-2-1

(必填)HUGGINGFACEHUB_TOKEN:填入tip提到的api
(必填)BOT_TOKEN:电报机器人token
(必填)API_URL:调用模型的API链接,可在HuggingFace的模型详情页面右上方Deploy-Inference API查看
docker-compose.yml

services:
  chatgpt:
    image: sheepgreen/sdbot #或使用github镜像ghcr.io/slippersheepig/sdbot
    container_name: sdbot
    volumes:
      - ./.env:/app/.env
    restart: always

以上两个文件放同一目录,然后运行docker-compose up -d命令即可

About

StableDiffusion图片生成电报机器人(HuggingFace接口)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •