npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@leomaradan/sd-tools

v1.2.0

Published

Welcome to the SD Tools, your all-in-one command line interface for interacting with the [AUTOMATIC1111's Stable Diffusion Web UI](https://github.com/AUTOMATIC1111/stable-diffusion-webui). This tool brings a robust queue system and a variety of commands t

Downloads

0

Readme

SD Tools

"Here's looking at you, kid."

Welcome to the SD Tools, your all-in-one command line interface for interacting with the AUTOMATIC1111's Stable Diffusion Web UI. This tool brings a robust queue system and a variety of commands to streamline your workflow with Stable Diffusion.

"May the Force be with you."

Queue System: The Ultimate Power

Our queue system is as versatile as a Jedi Master. With it, you can:

  • Load JSON or JS Files: Queue your prompts with ease.
  • Control Image Naming: Take charge of your image names with custom formatting.
  • Extension Management: Seamlessly handle extensions like ControlNet, Adetailers, MultiDiffusion, Scheduler Assistant, or Cutoff.
  • Basic to Advanced Scripting: Whether it's simple JSON scripting or full-blown prompt generation scripts, we've got you covered.
  • Permutations Galore: Generate multiple prompts with a single instruction, multiplying parameters like never before.
  • Cascading Prompts Files: Share common bases and build upon them effortlessly.
  • Automated Behaviors: Trigger actions like Adetailers, ControlNet Poses, and Cutoff tokens automatically.
  • And more!: Maybe I'll document it later.

"I'll be back."

Additional Commands: More Than Meets the Eye

Our tool offers several powerful commands to enhance your workflow:

  • Rename: Rename images in bulk using generation parameters and custom rules from JSON.
  • Extract: Extract prompts from lists of images into text or JSON formats.
  • Upscale: Upscale images from a directory using ControlNet Tiles or MultiDiffusion.
  • Redraw: Redraw images from a directory with specific styles using ControlNet ip-adapter or Lineart.

"To infinity and beyond!"

Getting Started

  1. Ensure nodejs exists (> 18.x):
node -v
  1. Install the dependencies:

NPM:

npm install -g @leomaradan/sd-tools

YARN:

yarn global add @leomaradan/sd-tools
  1. Run AUTOMATIC1111 with --api:

Windows

cd <automatic1111 folder>
webui-user.bat --api

Unix

cd <automatic1111 folder>
./webui.sh --api
  1. Run the Tool:
./sd-tools init

"Why so serious?"

Usage Examples

  • Queue Command:

    sd-tools queue your_prompts.json

    Allowed parameters:

    • --silent: Do not display anything in the terminal
    • --no-log: Don't log the queries output to a file
    • --verbose: Display additional information in the terminal
    • --simulate: Run the whole process but don't send the queries to the API
    • -v, --validate: Only validate the prompts file
  • Rename Command:

    sd-tools rename <source> <target>

    Allowed parameters:

    • --silent: Do not display anything in the terminal
    • --no-log: Don't log the queries output to a file
    • --verbose: Display additional information in the terminal
    • -c, --config: Configuration file for renaming images.
    • -k, --keys: keys to search for. Allowed formats: "key:value" or "key:value1;value2"
    • -p, --pattern: Replace pattern
    • -t, --test: Test mode
  • Extract Command:

    sd-tools extract <source> <format = textbox | json>

    Allowed parameters:

    • --silent: Do not display anything in the terminal
    • --no-log: Don't log the queries output to a file
    • --verbose: Display additional information in the terminal
    • -a, --add-before: Add a string before the extracted text. Use | to add multiple texts and generate multiple outputs
    • -o, --output: Optional output file. If not provided, the output will be displayed in the terminal
    • -r, --recursive: Recursively extract from from sub-directories
  • Upscale Command:

    sd-tools upscale <source> <style = controlnet | tiled-diffusion>

    Allowed parameters:

    • --silent: Do not display anything in the terminal
    • --no-log: Don't log the queries output to a file
    • --verbose: Display additional information in the terminal
    • --simulate: Run the whole process but don't send the queries to the API
    • -c, --checkpoint: Force a specific checkpoint
    • -d, --denoising: Denoising factor. If multiple values are provided, the command will generate multiple queries
    • -t, --recursive: Recursively upscale images from sub-directories
    • -x, --upscaling: Upscaling factor. If multiple values are provided, the command will generate multiple queries
  • Redraw Command:

    sd-tools redraw <source> <style = realism | anime | both> <method = classical | ip-adapter | both>

    Allowed parameters:

    • --silent: Do not display anything in the terminal
    • --no-log: Don't log the queries output to a file
    • --verbose: Display additional information in the terminal
    • --simulate: Run the whole process but don't send the queries to the API
  • Other Commands:

    Init the tools, or force refreshing the cache

    sd-tools init

    Allowed parameters:

    • -e, --endpoint: Endpoint to use. Default is http://127.0.0.1:7860
    • -f, --force: Force reset config
    • -p, --purge-cache: Purge the cache

    Get or set the configs

    sd-tools config-get <key>
    sd-tools config-set <key> <value>

    Running the configuration wizard

    sd-tools wizard

"I'm the king of the world!"

Contributing

We welcome contributions from everyone! Whether it's bug fixes, feature additions, or documentation improvements, feel free to submit a pull request.

"Hasta la vista, baby."

License

This project is licensed under the MIT License. See the LICENSE file for details.

"Houston, we have a problem."

Troubleshooting

If you encounter any issues, check out our Wiki or open an issue on GitHub.

Please be aware that this tool is still in development, and some features may not be fully implemented or may change in the future. It works on my PC, bye the way


Enjoy your journey with the SD Tools, and remember, the only limit is your imagination!