SuperAPIAI Directory

SdPaint

github.com · AI images

Stable Diffusion Painting

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS

About this tool

SdPaint is a Python-based Stable Diffusion painting tool that allows you to draw freely on a canvas and sends the image of each stroke to the Automatic1111 API, automatically updating the canvas when the AI generates a new image. It requires the user to have Stable Diffusion WebUI with API mode enabled, and to install the ControlNet extension and the corresponding AI models.

Main capabilities:

  • Real-time painting: each stroke triggers an API request and updates the canvas.
  • ControlNet support: automatically retrieves available scribble and lineart models from the API, and they can be used in the configuration.
  • Fast mode: with LCM LoRA, images can be generated with extremely low step counts; by default it uses DPM++ SDE Karras and 6 steps, and the LoRA name, step count, CFG scale, sampler, etc. can be configured in JSON.
  • Multiple ControlNet models: multiple models can be configured in the controlnet_models list in config.json, and cycled through with the l and m keys.
  • ControlNet detectors: a detector list can be configured (by default Sketch and Scribble are both based on pidinet), and cycled through with the d key.
  • Auto-save: rendered images can be automatically saved to the outputs and outputs/autosave directories; the maximum number saved is controlled by autosave_images_max in config.json, and it can also be disabled by setting autosave_images to "false".
  • Preset saving and loading: Ctrl + numeric keypad 1-9 can be used to save render settings, and Ctrl + Alt + numeric keypad 1-9 to save ControlNet settings; presets are saved in configs\presets.json and remain available after restart.
  • Web interface: the web interface can be started by running SdPaint\StartWeb.bat.
  • img2img experimental mode: start with --img2img --source <image_file_path> to monitor image file changes and use them as the img2img source; the configuration file is configs\img2img.json.

How to use:

  1. Make sure Stable Diffusion WebUI has API mode enabled, and install the ControlNet extension and the required models.
  2. The first time you run the Start file, the script creates the configs\config.json, configs\controlnet.json, and configs\img2img.json configuration files, and automatically retrieves the available scribble and lineart ControlNet models from the API.
  3. config.json manages the global interface and script configuration; when the application starts, it uses the first value of each list (such as controlnet_models, denoising_strengths).
  4. controlnet.json and img2img.json can configure prompts, negative prompts, seeds, ControlNet models, etc.; after saving the JSON, they take effect on the next stroke or when Enter is pressed.
  5. The controlnet-high.json-dist example configuration can be used to obtain better image quality, but it requires longer rendering time and a powerful graphics card.
  6. To add additional ControlNet models, place the model folder into the models folder of the ControlNet extension.
  7. Fast mode requires downloading LCM LoRA from Hugging Face (supporting SD 1.5 and/or SDXL), and saving it as LCM_LoRA_Weights.safetensors to the ./models/LoRA/ directory of Stable Diffusion WebUI.

Use cases:

  • Real-time AI-assisted painting, quickly turning sketches into refined images.
  • Using ControlNet to control the structure of the generated result.
  • Using fast mode for low-step, fast rendering when resources allow.

Limitations:

  • Requires a local or accessible Stable Diffusion WebUI and API mode.
  • Requires installing the ControlNet extension and the corresponding models.
  • Fast mode requires downloading the LCM LoRA model.
  • High-quality configurations require a powerful graphics card.
  • The "pixel perfect" preprocessing mode is disabled by default becauseresolutions greater than 512 may have an adverse effect on the scribble and lineart models.
  • Some features (such as the Cycle shortcut) wait for the Shift key to be released before starting rendering.
  • Specific information such as fees, pricing, and platform support is not currently provided.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools