Giter Club home page Giter Club logo

txt2mask's Introduction

txt2mask for Stable Diffusion

Automatically create masks for inpainting with Stable Diffusion using natural language.

Introduction

txt2mask is an addon for AUTOMATIC1111's Stable Diffusion Web UI that allows you to enter a text string in img2img mode which automatically creates an image mask. It is powered by clipseg. No more messing around with that tempermental brush tool. ๐Ÿ˜…

This script is still under active development.

image

Installation

Simply clone or download this repo and place the files in the base directory of Automatic's web UI.

Usage

From the img2img screen, select txt2mask as your active script:

image

In the Mask Prompt field, enter the text to search for within your image. (In the case of the topmost screenshot, this value would be 'business suit' and the prompt box at the top of your UI would say 'sci-fi battle suit.')

Adjust the Mask Precision field to increase or decrease the confidence of that which is masked. Lowering this value too much means it may select more than you intend.

Press Generate. That's it!

Known Issues

  • The "inpainting at full resolution" option can cause this script to crash. Looking for a fix.
  • This uses a different underlying tech for language interpretation, so entering a finetuned object into the Mask Prompt won't work. In general, less is more for masking: instead of trying to mask "a one-armed man doing a backflip off a barn" you will probably have more luck writing "a man."

txt2mask's People

Contributors

thereforegames avatar

Watchers

 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.