Closed norcalskeptic closed 1 year ago
Guessing, here, but check the location and permissions thereof for '~/.dream_history'. If it doesn't exist, try creating it.
Note; IDK the level of *nix proficiency here, but '~' represents the users's home directory, so the permissions issue isn't there (the system would be too fouled up to use if so). There's something going on with the '.dream_history' dir in the user's home directory.
Hi @norcalskeptic , is this still an issue?
I'm experiencing a very similar issue on an M1 2020 MacBook Air. I can get the web UI to run, but not the command line version.
Here's the error message:
As far as I can tell, opt.outdir
is resolving to outputs/img-samples/
. I tried creating outputs/img-samples/.invoke_history
and setting 777 permissions, but the error is still occurring.
I believe the issue is probably Mac/readline specific. I see other Mac users have reported the same Operation not permitted
error with readline in other contexts. Just like the author of that question, when I check the contents of outputs/img-samples/.invoke_history
, I see:
_HiStOrY_V2_
After further research, it appears that the Mac needs gnureadline
rather than readline
.
I was able to get the command line to load correctly after:
gnureadline
via piptry:
import gnureadline as readline
readline_available = True
except:
try:
import readline
readline_available = True
except (ImportError,ModuleNotFoundError):
readline_available = False
@Kirkman Thanks for troubleshooting. I'm also on an M1 Macbook - and many of our users are as well - but this seems to be a very rare issue. I cannot recreate it.
I'm very skeptical that gnureadline
is needed - see the big STOP
blurb on the package details here: https://pypi.org/project/gnureadline/
How did you install invokeai and set up its venv? I wonder if something funky happened along the way...
I used pyenv
to install Python 3.9 and create a virtualenv. Then I followed the pip instructions under the manual install.
But I have noticed some oddities about the way pyenv's virtualenvs are functioning. So, yes, it's possible there's something funky going on (or that I screwed up).
What I can say for sure is that before switching to gnureadline, I absolutely could not get the command line to work (though the web UI works fine). After making changes to use gnureadline, the Invoke command line works.
@Kirkman Ok, thanks. Given the big warning on the gnureadline
PyPi homepage, I don't think we should change the dependency, but I'm not a python-y person. Paging @tildebyte
...who in turn is paging @lstein. I helped figure out how to get readline going on Windows, but I don't have a clue on MacOS...
Sorry @Kirkman , I don't think we have any idea on how to fix this for your specific case. I think your installation is... unique, let's say... for unknown reasons. Glad you found a fix though and I'll remember this issue if we see this come up again.
Struggling to help my friend install on his Mac.
Made it all the way through install, but when trying to run dream.py get the following error:
(ldm) The-Void-Mirror:stable-diffusion JasonM$ python scripts/dream.py --full_precision Traceback (most recent call last): File "/Users/JasonM/stable-diffusion/scripts/dream.py", line 12, in
import ldm.dream.readline
File "/Users/JasonM/stable-diffusion/ldm/dream/readline.py", line 123, in
readline.read_history_file(histfile)
PermissionError: [Errno 13] Permission denied
I'm not familiar with MacOS, did my best to help him but can't seem to get past this step, would appreciate any help.
Thanks!