back to home

drawthingsai / draw-things-community

The community repository for the Draw Things app.

View on GitHub
386 stars
39 forks
41 issues
CSwiftPython

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing drawthingsai/draw-things-community in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/drawthingsai/draw-things-community)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Draw Things Community This is a community repository that maintains public-facing code that runs the Draw Things app. Currently, it contains the source code for our re-implementation of image generation models, samplers, data models, trainer within the app. Over time, as we move more core functionalities into separate libraries, this repository will grow. Contributions While we expect the development to be mainly carried out by us, we welcome contributions from the community. We require a Contributor License Agreement to make this more manageable. If you prefer not to sign the CLA, you're still welcome to fork this repository and contribute in your own way. Roadmap and Repository Sync The Draw Things app is managed through a private mono-repository. We do per-commit sync with the community repository in both ways. Thus, internal implemented features would be "leaked" to the community repository from time to time and it is expected. That being said, we don't plan to publish roadmap for internal mono-repository. Whether we would like to publish roadmap for public community repository would require further deliberation and feedback from the community. Quick Start with Swift Package Manager on macOS If you want to build the SwiftPM target locally, you can build it with: To run the CLI with SwiftPM, use the executable name form (not ): You can also inspect CLI options with: Self-host gRPCServerCLI from Packaged Binaries We provide pre-built self-hosted gRPCServerCLI binaries through this repository. Latest version should be available at Releases. These pre-built binaries provide a quick way to host Draw Things gRPC Server on your Mac or Linux systems without download the Draw Things app. Draw Things app then can connect to these self-hosted servers through Server-Offload feature within your network. macOS On macOS, simply download the gRPCServerCLI-macOS on your macOS systems. You can put it under or anywhere you feel comfortable, and launch it with: If you have Draw Things app installed, you can simply refer the model path by doing: CUDA-capable Linux We provides CUDA-accelerated gRPCServerCLI for Linux systems. The simplest way to start is to use Docker and NVIDIA Container Toolkit. Note that as of writing, the gRPCServerCLI supports RTX 20xx / RTX 30xx / RTX 40xx and should support A100 up to H100 NVIDIA cards. Our Docker image uses CUDA 12.4.1 as the base, which requires NVIDIA graphics driver version 550.54.15 or above. Once both are properly installed. You can pull the latest gRPCServerCLI Docker image and then verify that GPUs are accessible from the container: If it shows your GPUs, you are OK. A typical output looks like this: The Docker image is maintained at https://hub.docker.com/r/drawthingsai/draw-things-grpc-server-cli. To run the actual gRPCServerCLI from Docker, do: Note that the containerized process cannot advertise its addresses to your local network hence you need to manually type the IP address and port inside Draw Things app to successfully connect. For RTX 20xx graphics cards, you need to disable FlashAttention: Getting Started for Development We use Bazel as our main build system. You can build components either on Linux or on macOS. On macOS, you need to have Xcode installed. On Linux, depending on whether you have NVIDIA CUDA-compatible GPU, the setup can be different. After neccessary dependencies installed, you can run: To setup the repo properly. To verify the installation, run: Self-host gRPCServerCLI from Scratch gRPCServerCLI is fully open-source, meaning that on the same system, you can build byte-by-byte matching prebuilt binaries as our provided ones. This is relatively easy on macOS systems, and requires a bit more setup on others. macOS First, you need to setup this repository on your macOS. To build anything with this repository, you need Homebrew and Xcode. To setup the repository, simply run: This should setup necessary tools, such as Bazel for you. To build gRPCServerCLI, you can run: To build exactly the same as our prebuilt-binary: CUDA-capable Linux We will show how to do build gRPCServerCLI with Ubuntu 22.04. First, you need to install CUDA, Swift, Bazel and CUDNN. Afterwards, you can the rest: Make sure when running , the file successfully generated. This file should look like this: There should also be a file contains CUDA configuration: Pay attention to CUDA version and CUDNN version to match yours. To build the exact binary as the ones we use for the Docker image, do the following: Note that you might encounter issues with cannot find . In that case, make sure it is properly named, I have to do: to make it discoverable. License This repository is licensed under GNU General Public License version 3 (GPL-v3) just like A1111 or Fooocus. License Examples To illustrate how GPL-v3 applies in various scenarios, consider the following examples of acceptable licensing practices under our policy: Standalone Applications If you develop a new application using code from this repository, and you release it on any app distribution platform (e.g., App Store) as a standalone product (meaning it functions independently and is not merely an HTTP client for Draw Things), you are required to license the entire application under GPL-v3. Forking and Enhancements Should you fork this repository and introduce enhancements or additional functionalities, any new code you contribute must also be licensed under GPL-v3. This ensures all derivative works remain open and accessible under the same terms. Server and Client Development If you use this repository to build a server application, either through HTTP or Google Protobuf (not limited to either), and subsequently develop a client application that communicates with your server, the following rules apply: • The source code for both the Google Protobuf definitions and the server must be published under GPL-v3. • The client application can be licensed under a differ…