Code Monkey home page Code Monkey logo

stable-diffusion-webui-vectorstudio's Introduction

stable-diffusion-webui-vectorstudio

Beta-Phase

Adds Javascript-SVG-Editor (SVG-Edit) as a tab to Stable-Diffusion-Webui Automatic 1111.

  • You can either generate txt2vectorgraphics and finish/edit them in this svg editor
  • Or start drawing in svg editor and send your sketches to Controlnet (txt/img2-img) to a particular control net instance.

Installation

  • Easy way: open Extension Tab in SD-Webui and load Available Extensions, checkbox the Vector Studio
  • Or: Copy this url from the git repository and add this extension by pasting it into the Extension Tab/Url. (more or less git clone)

  • If you want to create vectorgraphics (svg) download POTRACE and put it into extensionfolder/bin/
    This is tested only under windows, yet.

For Hackers and Betatesters

  • Linux & MacOos. Potrace is compiled for each OS, so you can just download and add the binary as mentioned to extensionfolder/bin/potrace.exe.
    Yes, rename it either to potrace.exeor create a link named potrace.exe and point to your installation.

How it works

It tunes your prompts in that way to create suitable images to be vectorizied by the POTRACE command line tool. The resulting SVG or PDF file is stored next to your png files in output/samples (default).

Examples

prompt PNG SVG
Happy Einstein
Mountainbike Downhill
coffe mug in shape of a heart
Headphones

Screenshot

image image

Dark Theme, with SVG-Background checkerboard: image

Features

  • Added SVG-Edit as Tab with "Sendto"-Buttons from Gallery to SVG-Editor and from SVG-Editor your canvas as input for Controlnet!

  • New: Added Visual Styles - RadioButtons provided by the script. Edit the script to extend of modify Stuff like Illustration, Tattoo, Anime etc, to save your time finding prompts on your own. If nothing matches, select "None - promp only" and have back full control.

POTRACE for non-windows

Linux

If you're running under WSL, Ubuntu or another Linux distro you will need to install potrace. Run sudo apt install potrace.

Mac

Run brew install potrace. Ensure potrace is in your PATH so that you could run in simply by calling from a command terminal.

Dependencies, Potrace

https://potrace.sourceforge.net/download/1.16/potrace-1.16.win64.zip
and extracts only the executable into scripts folder in the scripts folder.

Recommendations

  • Use short prompts, like "Einstein", "Happy Einstein" ...
  • avoid "realistic" attributes
  • Sampling Steps ~40 is my best experience (to reduce noise and avoid details)
  • CFG Scale 10-12
  • Dont restore faces
  • use 512x512 if no special demand on ratio
  • Batch count support (16)
  • Mostly you want to make white parts opaque (see checkbox in the scripts ui)
  • Same for clipping the content to SVG size
  • HINT: Install Microsoft Powertoys for free, and enjoy in your file explorer SVG previews. image

Using

  • Vector studio is still listed in the script-section: image

  • Three divisons here

    • style buttons(deprecated) -> your your Webui-Styles instead
    • lower left: vector-settings
    • lower right: png2png-settings (quant, set transparent color for poor men)

Edit SVG - Button

Select any created SVG and click below of the gallery the "Edit SVG" button. It sends (by overwriting eveything else) the SVG to the build-in SVG-Edit´or Finish/check your svg for details, and or send back to Controlnet

image

History

  • Added Background-Style dedicated for any SVG-Graphic in WebUI. Default is a checkerbox background to determine what is white shape and what is unfilled. For customizing please edit the file style.css in the extension folder of vectorstudio; either comment in/out white or checker pattern; or whatever you like... image
  • Fix on Controlnet internal images
  • Display SVGs in gallery!

Todos

  • Linux/Mac-Support
  • Settings
  • Rework of the GUI for vectorizing

Note

This extension will replace the simple "txt2vectorgraphics" script. No need for both

stable-diffusion-webui-vectorstudio's People

Contributors

ciphernaut avatar georglegato avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.