Giter Site home page Giter Site logo

Comments (5)

FlowDownTheRiver avatar FlowDownTheRiver commented on May 30, 2024 1

I couldn't write enough in the previous post even it was buggy with 0.6 and fixed in 0.7 but I wanted to thank you.I have tested it and the behaviour is like expected.This is a very good utility saving a lot of time than masking manually.

As I python beginner I am trying to learn stuff hoping to reach at some level that I can write some code which people can benefit like yours one day.That is why I envy your work a lot and appreciate it.

Btw having an option to be changed by the user for the delimeter is great and yeah I somehow missed "inpaint not masked" that it can be used as inverting.

This tool definitely has be part of the automatic's repo by default.

from txt2mask.

ThereforeGames avatar ThereforeGames commented on May 30, 2024

Hi @FlowDownTheRiver,

I like the idea of a negative mask prompt a lot - it has been added in 0.0.6! Thanks for the suggestion.

I have changed the default delimeter from "|" to "," cos it makes more sense and easy to write.I would like to see it as a default.

The vertical pipe was selected as the delimiter because I don't want to interfere with common characters like "," in case the user wishes to use such characters in a single prompt search. I do think "|" will yield better results most of the time, but maybe not always.

That said, you're welcome to change this to anything you prefer (it is assigned to a variable called delimiter_string in the latest version) and I may look into having some sort of user preferences file if I end up developing this script much further.

In addition to these a checkbox for inverting the mask can be a cool feature I believe.

If you're on the "Inpaint a part of image" tab of the UI, there is an option to "Inpaint not mask" which effectively inverts the txt2mask script.

from txt2mask.

FlowDownTheRiver avatar FlowDownTheRiver commented on May 30, 2024

Getting value error

'mask': <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=2048x3072 at 0x2645BF6DDB0>}, None, 0, 20, 0, 4, 0, False, False, 1, 1, 1, 13, 0.6, -1.0, -1.0, 0, 0, 0, False, 512, 512, 0, 0, 64, True, 0, 8, '', '', '', '', 1, 50, 0, 4, 1, '

Recommended settings: Sampling Steps: 80-100, Sampler: Euler a, Denoising strength: 0.8

', 128, 4, ['left', 'right', 'up', 'down'], 1, 0.05, 128, 4, 0, ['left', 'right', 'up', 'down'], False, None, '', False, 'cloth,neck', 'face', 96, True, 0, '

If you like my work, please consider showing your support on Patreon. Thank you! ❤

', 1, '', 4, '', True) {}
Traceback (most recent call last):
File "C:\stable-diffusion-webui\modules\ui.py", line 135, in f
res = list(func(*args, **kwargs))
File "C:\stable-diffusion-webui\webui.py", line 58, in f
res = func(*args, **kwargs)
File "C:\stable-diffusion-webui\modules\img2img.py", line 134, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "C:\stable-diffusion-webui\modules\scripts.py", line 159, in run
processed = script.run(p, *script_args)
File "C:\stable-diffusion-webui\scripts\txt2mask.py", line 156, in run
processed = processing.process_images(p)
File "C:\stable-diffusion-webui\modules\processing.py", line 312, in process_images
p.init(all_prompts, all_seeds, all_subseeds)
File "C:\stable-diffusion-webui\modules\processing.py", line 534, in init
mask = mask.crop(crop_region)
File "C:\stable-diffusion-webui\venv\lib\site-packages\PIL\Image.py", line 1171, in crop
raise ValueError("Coordinate 'right' is less than 'left'")
ValueError: Coordinate 'right' is less than 'left'

Screenshot 2022-09-21 at 22-16-38 Stable Diffusion-(1)

from txt2mask.

ThereforeGames avatar ThereforeGames commented on May 30, 2024

Hmm, seems to be related to using input images that are not 512x512 - looking into it.

from txt2mask.

ThereforeGames avatar ThereforeGames commented on May 30, 2024

Okay, should be fixed now. I switched to another image inversion function. No clue why the previous one was spazzing out though.

from txt2mask.

Related Issues (20)

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.