Comments (4)
Hi @Ev-Bro,
Thank you for reaching out!
It looks like A1111 has been updating the UI a lot today. I just grabbed the latest version and it looks like the txt2mask shortcode is working correctly - maybe the bug was already resolved?
If the error persists on your end, please let me know your exact prompt and inference settings if you don't mind. Thanks!
from unprompted.
Thanks for the reply. Same issue today after pull some more Auto1111 updates. I tried reinstalling the extension with no luck. I have not tried a full Auto1111 reinstall.
What are inference settings?
Here is my prompt:
[txt2mask smoothing=10]black dress[/txt2mask] red dress
error:
Error running process: C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\scripts\unprompted.py
Traceback (most recent call last):
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\lib\shortcodes.py", line 133, in render
return str(self.handler(self.token.keyword, self.pargs, self.kwargs, context, content))
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\lib\shared.py", line 57, in handler
return(self.shortcode_objects[f"{keyword}"].run_block(pargs, kwargs, context, content))
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted/shortcodes\stable_diffusion\txt2mask.py", line 149, in run_block
self.image_mask = get_mask().resize((self.Unprompted.shortcode_user_vars["init_images"][0].width,self.Unprompted.shortcode_user_vars["init_images"][0].height))
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted/shortcodes\stable_diffusion\txt2mask.py", line 102, in get_mask
img = transform(self.Unprompted.shortcode_user_vars["init_images"][0]).unsqueeze(0)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\venv\lib\site-packages\torchvision\transforms\transforms.py", line 94, in call
img = t(img)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in call_impl
return forward_call(*input, **kwargs)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\venv\lib\site-packages\torchvision\transforms\transforms.py", line 269, in forward
return F.normalize(tensor, self.mean, self.std, self.inplace)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\venv\lib\site-packages\torchvision\transforms\functional.py", line 360, in normalize
return F_t.normalize(tensor, mean=mean, std=std, inplace=inplace)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\venv\lib\site-packages\torchvision\transforms\functional_tensor.py", line 959, in normalize
tensor.sub(mean).div_(std)
RuntimeError: The size of tensor a (4) must match the size of tensor b (3) at non-singleton dimension 0
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\modules\scripts.py", line 338, in process
script.process(p, *script_args)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\scripts\unprompted.py", line 105, in process
Unprompted.shortcode_user_vars["prompt"] = Unprompted.process_string(apply_prompt_template(original_prompt,Unprompted.Config.templates.default))
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\lib\shared.py", line 77, in process_string
string = self.shortcode_parser.parse(string,context)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\lib\shortcodes.py", line 219, in parse
return stack.pop().render(context)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\lib\shortcodes.py", line 58, in render
return ''.join(child.render(context) for child in self.children)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\lib\shortcodes.py", line 58, in
return ''.join(child.render(context) for child in self.children)
File "C:\Users\username\AUTOMATIC1111\stable-diffusion-webui\extensions\unprompted\lib\shortcodes.py", line 137, in render
raise ShortcodeRenderingError(msg) from ex
lib.shortcodes.ShortcodeRenderingError: An exception was raised while rendering the 'txt2mask' shortcode in line 1.
from unprompted.
I just installed the extension and can confirm I am having the same problem. I don't want to set you on the wrong path, but I suspect that somehow it is getting an RGBA image now instead of RGB, which is consistent with some changes in the webui having to do with allowing customization in the bg color.
Webui has a new flatten function and seems like it had to be fixed in other places e.g.:
AUTOMATIC1111/stable-diffusion-webui@c6f347b
which at a cursory glance looks a little like what is happening where this bug is here. The flatten function (I believe) is new, maybe you need to do something similar now as well.
I don't have any way to debug right now to test this, unfortunately...
from unprompted.
Fixed in v5.0.0. Thank you!
from unprompted.
Related Issues (20)
- [set width] and [set height] are not applied correctly when batch count > 1 HOT 3
- Batch size has weird effects on temp images generated by zoom_enhance HOT 1
- Unprompted causing "IndexError" when batch size>1 and hiresfix enabled HOT 8
- zoom_enhance with controlnet crashes, python stack strace HOT 1
- Encoding problem with icons HOT 1
- 'NoneType' object does not support item assignment HOT 8
- zoom_enhance with bypass_adaptive_hires bug HOT 4
- txt2mask with fastsam, clip_surgery HOT 1
- Broken interaction between prompt, hires fix and batch count HOT 5
- Unprompted cannot differentiate between a template file and a template subfolder when named the same HOT 3
- Unprompted has stopped being deterministic HOT 9
- show the controlnet image after generation HOT 3
- ImageIO does not generally support reading folders. HOT 1
- (ERROR) Failed to install opencv-python dependency for Unprompted - [faceswap] insightface functions may not work HOT 2
- unable to write .json files _all_external and _external flags HOT 1
- processor_res vars won't work with sdxl controlnets HOT 4
- txt2mask with batch only applying to first image with "inpaint not masked"
- Bodysnatcher + Adetailer: Pillow fails when inverting txt2mask: OSError: not supported for this image mode HOT 2
- Secondary shortcode not working with filter_tags
- Impossible to make good txt2mask composites
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unprompted.