ThereforeGames / unprompted

Templating language written for Stable Diffusion workflows. Available as an extension for the Automatic1111 WebUI.
777 stars 66 forks source link

Text2mask #149

Closed apollion83 closed 1 year ago

apollion83 commented 1 year ago

Text2mask works perfectly for a single image but when I use batch mode, it works well for the first image but starts to ruin all the following images more and more until they are completely destroyed. Prompt: Jiu with perfect body, happy, (wearing a blue and white striped bikini), (photorealistic:1.5), (raw photo), (photo-realistic), with (pink hair) and light-blue eyes, ((best quality)) (detailed skin:1.3) (intricate details) (8k) (HDR) (cinematic lighting) (sharp focus) (very high quality) (oily skin), slim, best shadow, bare neck, detailed hair, in a white wall background, huge tits, huge chest, hyper realistic, photograph, film grain, Leica 50mm, Kodak portra 800, chiaroscuro, f1. 4, pink hair, pink hair, [txt2mask precision=80 smoothing=30]head|skin|arms|hair|neck|[/txt2mask] Negative: (monochrome) (bad hands) (disfigured) (grain) (Deformed) (poorly drawn) (mutilated) (low-res) (deformed) (dark) (low-poly) (CG) (3d) (blurry) (duplicate) (watermark) (label) (signature) (frames) (text) worst quality, low quality, medium quality, chocker, necklace, (cgi, painting, anime, unreal, doll), skin spots, color spots, fluorescence, abs, hair reflex, hair on the neck, anything on the neck, accessories, headband, circlet,(masterpiece:1.2) bottles, boxes, crackers, orange julius, birds, lowres, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry, ((((ugly)))), (((duplicate))), ((morbid)), ((mutilated)), [out of frame], extra fingers, mutated hands, ((poorly drawn hands)), ((poorly drawn face)), (((mutation))), (((deformed))), ((bad anatomy)), (((bad proportions))), ((extra limbs)), cloned face, (((disfigured))), extra limbs, gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), mutated hands, (fused fingers), (too many fingers), (((long neck))), purple color, blue hair, purple hair, [txt2mask neg_precision=200 negative_mask=hands][/txt2mask] bad-hands-5 bad_prompt_version2 badhandv4

ThereforeGames commented 1 year ago

Hi @apollion83,

I will run some tests, but I'm guessing this might be due to the use of [txt2mask] in your negative prompt. You can use neg_precision and negative_mask in the positive prompt field all within a single [txt2mask] block.

DukemFIVE commented 1 year ago

Hey i have the same problem, i have the [txt2mask] in my positive prompt. The first mask of the batch gets used for all pictures..

siliconebutts commented 1 year ago

I assume the desire to have a txt2mask feature would be to automate the process of drawing a mask. Would make a lot of sense for people to want to use such a feature in combination with batch generation. It's a shame that it has to draw one mask for the first image and then re-use that same mask for the rest in the batch when "only mask" is enabled. It almost effectively defeats the purpose of the feature...

I run into the same issue when trying to use "only mask" with batch with a mask directory. It changes the mask properly when "whole image" is used but keeps the first mask when "only masked" is enabled. I wonder if the issue here is caused by the same thing.

the txt2mask that is outdated and stand alone script succeeds where this has had issues. The abandoned script draws a new mask even when "only mask" is enabled.

I greatly depend on the currently abandoned script for what I use image diffusion for. I fear the day when the abandoned script will lose compatibility.

Please correct the issue in unprompted before that day comes. It's an excellent feature, saves me hours! I can leave and do other things instead of having to sit in front of my pc swapping a mask out every 20 seconds.

ThereforeGames commented 1 year ago

Hi @siliconebutts and @DukemFIVE,

I am interested in fixing [txt2mask] for batch processing - just so we're clear, are you both referring to the "Batch" tab in img2img, and if so, what are your values for the directory fields? Is Inpaint batch mask directory blank?

Thank you!

ThereforeGames commented 1 year ago

Hi guys,

As of Unprompted v9.4.0, you can now use the img2img batch tab with [txt2mask] and hopefully other shortcodes as well. 🙂

This is an experimental implementation, so feel free to open another issue if it gives you any trouble.