百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dfserver

> 包管理
开源

一个分布式后端 AI 工作流服务器

343 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个分布式后端 AI 工作流服务器

dfserver

DFserver is an open-sourced distributed backend AI pipeline server for building self-hosted distributed GPU cluster to run the Stable Diffusion and various AI image or prompt building model, but also has a potential to expend large-scale production service, and etc.

Give us a star and your valuable feedback :)

news

Try Stable Diffusion 2 experimental worker: SD2.md

https://user-images.githubusercontent.com/561810/199627149-a8e0716d-3200-41ee-9fe6-77ff870431af.mp4

The service can uses idle fancy GPUs shared by your friends to build a GPU cluster for running various AI models or just be deployed on your own computer. In the future we will support counting and distributing possible revenue based on the workload of each GPU (Worker).

I have a beautiful vision for DFserver, which can be an enterprise-level service application that can flexibly extend the pipeline to connect models for different tasks in the AI image generation workflow, such as DeepL for supporting multi language prompt input, or Gobig by DD for filling more rendering details while upscale, etc.

Will soon support the generation of multiple images with a single command, and functions related to init-image.

Tasks currently supported in DFserver Pipeline server

  • AI image generator: Stable Diffusion 1.4 (with negative prompt) and Waifu Diffusion 1.3
  • Image Upscaling (Default realesrgan-x4plus model)
  • Guess prompt from an image (CLIP Interrogator)
  • Prompt Build Assist (finetuned from a GPT Neo2.7B model by using 200K prompts selected and preprocessed from krea-ai open-prompts. Model download: https://huggingface.co/huoju/gptneoforsdprompt)

System Topology

Architecture

Task Sequence Diagram

Getting Start

Server Prerequisites

  • RabbitMQ
  • discord developer account and a discord bot token

Worker Prerequisites

  • A group of friends who have fancy GPUs
  • pytorch
  • diffusers and models

Build the dfserver

Requirements:

  • Go 1.18 or newer
bash
$ git clone "https://github.com/huo-ju/dfserver.git"
$ cd dfserver
$ make linux-amd64 #or make linux-arm64

dfserver Configuration

bash
cp configs/config.toml.sample configs/config.toml

Edit the config.toml, setup the username/password/host address/port of the rabbitmq.

The default configuration was defined ONE task queue for stable diffusion ai worker (name is ai.sd14), ONE discord bot service, ONE process worker for discord(name is discord.server1)

Run dfserver

bash
./dist/linux_amd64/dfserver --confpath=./configs

or via docker-compose (so you don't need to install RabbitMQ particularly):

bash
docker compose up -d

PS: You still need to set a user in RabbitMQ for ai worker after docker-compose starting up.

AI Worker Install

Copy the pyworker dir to the GPU server, and install all diffusers dependencies(nvidia drivers, CUDA, pytorch, models etc...).

bash
cd pyworker
pip install -r requirements.txt

AI Worker Configuration

bash
cp configs/sd14mega_config.ini.sample configs/sd14mega_config.ini 
#or
cp configs/realesrgan_config.ini.sample configs/realesrgan_config.ini
#or
cp configs/clipinterrogator_config.ini.sample configs/clipinterrogator_config.ini

Edit the config.ini, setup the username/password/host address/port of the rabbitmq.

Run the ai worker

bash
python worker.py sd14mega #stable-diffusion worker with community SD Mega pipeline
#or
python worker.py realesrgan #realesrgan upscaling worker
#or
python worker.py clipinterrogator # clip-interrogator worker

Usage

Add the discord bot to your disord server, and input your prompt.

Example:

!dream Cute sticker design of a AI image generator robotic pipeline service, app icon, trending on appstore, trending on pixiv, hyper-detailed, sharp

with negative prompt (diffuser >= v0.4.0):

!dream Bouquet of Roses |red rose :-1|

The ai task will be collected from user input by discord bot, and published to the rabbitmq, then the task will be fetched by ai worker (running on GPU servers).

The result (generated images) will be published back to the rabbitmq, fetched by process worker (discord.server1), and sent back to the user.

Run the dfserver and aiworker on boot, please see the systemd scripts in deployments

TODO

  • ✔️ Response error messages to users
  • ✔️ More AI workers, eg: upscale worker
  • [] Multi GPUs worker support
  • ✔️ Initial image
  • [] Mask/Inpaint

Credits

  • stability.ai
  • pharmapsychotic for clip-interrogator
  • @catmus

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goai-artai-pipelinediffuserspipeline

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类包管理
定价开源

> 相关工具

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image