#--outdir dir to samba share

22 messages · Page 1 of 1 (latest)

elfin pike
#

When I use '--outdir /media/share/folder-inside-share' (Even with single or double quotes around it), invoke.py throws an error after generating the image. The image is not saved in the specified folder within my --outdir argument.

#

Traceback (most recent call last):
File "/home/ubuntu/InvokeAI/backend/invoke_ai_web_server.py", line 1050, in save_result_image
path = pngwriter.save_image_and_prompt_to_png(
File "/home/ubuntu/InvokeAI/ldm/invoke/pngwriter.py", line 42, in save_image_and_prompt_to_png
image.save(path, 'PNG', pnginfo=info, compress_level=compress_level)
File "/home/ubuntu/anaconda3/envs/invokeai/lib/python3.10/site-packages/PIL/Image.py", line 2317, in save
fp = builtins.open(filename, "w+b")
PermissionError: [Errno 13] Permission denied: '/media/wolowitz/invokeai-output/000001.9787ea57.7912942.png'

Image generated: "None"

Traceback (most recent call last):
File "/home/ubuntu/InvokeAI/backend/invoke_ai_web_server.py", line 1088, in write_log_message
with open(self.log_path, "a", encoding="utf-8") as file:
PermissionError: [Errno 13] Permission denied: '/media/wolowitz/invokeai-output/invoke_log.txt'

Traceback (most recent call last):
File "/home/ubuntu/InvokeAI/backend/invoke_ai_web_server.py", line 1127, in get_url_from_image_path
if "init-images" in path:
TypeError: argument of type 'NoneType' is not iterable

#

Generating: 0%| | 0/1 [00:22<?, ?it/s]
stat: path should be string, bytes, os.PathLike or integer, not NoneType

Traceback (most recent call last):
File "/home/ubuntu/InvokeAI/backend/invoke_ai_web_server.py", line 832, in generate_images
self.generate.prompt2image(
File "/home/ubuntu/InvokeAI/ldm/generate.py", line 459, in prompt2image
results = generator.generate(
File "/home/ubuntu/InvokeAI/ldm/invoke/generator/base.py", line 98, in generate
image_callback(image, seed, first_seed=first_seed)
File "/home/ubuntu/InvokeAI/backend/invoke_ai_web_server.py", line 822, in image_done
"mtime": os.path.getmtime(path),
File "/home/ubuntu/anaconda3/envs/invokeai/lib/python3.10/genericpath.py", line 55, in getmtime
return os.stat(filename).st_mtime
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

#

--outdir dir to samba share

heady ore
#

It looks like a permission error exists in your InvokeAI-outputs folder near the top?

elfin pike
#

Yeah, but don't know how to fix it.

elfin pike
heady ore
#

That folder is local tot he machine or external?

elfin pike
#

External. It's a mounted Samba folder

heady ore
#

Not quite sure how to fix it, but that’s the only clue I’ve got as to why it wouldn’t work

boreal zealot
#

see if this works:
touch /media/wolowitz/invokeai-output/test.tmp
if it doesn't, then the problem is with your Samba share

elfin pike
#

Mmh, that only seems to work when I sudo :/

boreal zealot
#

there ya go 😉

#

get that fixed with your regular user and it'll work

elfin pike
#

mmh ok, see what I can do. Thanks for pointing me in the right direction!

elfin pike
#

Solved. Something stupid (what else?) of course... Adjusted some values in fstab 🙂

cedar surge
#

The only real problem with InvokeAI in this case is that you could easily miss the relevant error message because of the traceback. I'm in two minds about whether errors should always have a traceback or not, but have tended to side on more info rather than less.

heady ore
#

Think that’s the right call. More issues will end up solved with more info, I think

boreal zealot
#

yeah. especially at this stage, tracebacks are super valuable.

ionic fossil
#

Is there a config to set the outdir for people using the webserver ?

heady ore
#

As in, a webserver user can customize their own outdir? (muitiplayer use case)?

ionic fossil
#

Oh I could just set the flag when starting the script for webserver ..