Open Bstrum36 opened 1 year ago
Copying 'ldm' folder in stable-diffusion-main to 'scripts' folder. That's how I solve this problem. It begins to run with other problems occurring.
Thanks for the quick response. I copied the ldm folder to scripts and the program ran a little more. Below is the new error.
PS C:\Users\Conda\ldm\stable-diffusion-main\scripts> python txt2img.py
--prompt "a photograph of an astronaut riding a horse" --plms
Traceback (most recent call last):
File "C:\Users\Conda\ldm\stable-diffusion-main\scripts\txt2img.py", line
345, in
Here is the directory structure of the project from PyCharm. Note I did not delete the ldm folder from the stable-diffusion-main just copied it into scripts. [image: image.png]
Thanks for your help. I am looking forward to getting this workin as I have a project in mind.
On Sun, Sep 11, 2022 at 3:59 AM doraam @.***> wrote:
Copying 'ldm' folder in stable-diffusion-main to 'scripts' folder. That's how I solve this problem. It begins to run with other problems occurring.
— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/261#issuecomment-1242911367, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2XRUKMHOTORIE364CUPYLV5WGOXANCNFSM6AAAAAAQJQ5XH4 . You are receiving this because you authored the thread.Message ID: @.***>
The intent is to use the scripts from the parent directory:
C:\Users\Conda\ldm\stable-diffusion-main> python scripts\txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
... in this way the other interfaces have proper hierarchy.
Please, restore the repo and use in the expected fashion.
Here is the latest please advise.
PS C:\Users\Conda\ldm\stable-diffusion-main> python scripts\txt2img.py
--prompt "a photograph of an astronaut riding a horse" --plms
Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Traceback (most recent call last):
File "C:\Users\Conda\ldm\stable-diffusion-main\scripts\txt2img.py", line
345, in
On Sun, Sep 11, 2022 at 2:09 PM Rickey Bowers Jr. @.***> wrote:
The intent is to use the scripts from the parent directory:
C:\Users\Conda\ldm\stable-diffusion-main> python scripts\txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
... in this way the other interfaces have proper hierarchy.
Please, restore the repo and use in the expected fashion.
— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/261#issuecomment-1243014474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2XRUIXEQX2EBSKMYFX7ITV5YN4NANCNFSM6AAAAAAQJQ5XH4 . You are receiving this because you authored the thread.Message ID: @.***>
As per the installation instructions, model.ckpt
is required in the correct location:
models/ldm/stable-diffusion-v1/model.ckpt
This check point file will need to be one of the provided check points: https://huggingface.co/CompVis
Most people are using: sd-v1-4.ckpt
- which needs to be renamed and stored in the correct location.
I'll give it a try. Thanks
On Sun, Sep 11, 2022, 2:27 PM Rickey Bowers Jr. @.***> wrote:
As per the installation instructions, model.ckpt is required in the correct location:
models/ldm/stable-diffusion-v1/model.ckpt
This check point file will need to be one of the provided check points: https://huggingface.co/CompVis
Most people are using: sd-v1-4.ckpt - which needs to be renamed and stored in the correct location.
— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/261#issuecomment-1243017713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2XRULCQXTUORQF7S7YLP3V5YQCJANCNFSM6AAAAAAQJQ5XH4 . You are receiving this because you authored the thread.Message ID: @.***>
Slowly but hopefully surely we are moving forward.
Looks like a little progress but...
PS C:\Users\Conda\ldm\stable-diffusion-main> python scripts\txt2img.py
--prompt "a photograph of an astronaut riding a horse" --plms
Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Global Step: 470000
Traceback (most recent call last):
File "C:\Users\Conda\ldm\stable-diffusion-main\scripts\txt2img.py", line
345, in
What do I do now? Am I getting close??
On Sun, Sep 11, 2022 at 2:09 PM Rickey Bowers Jr. @.***> wrote:
The intent is to use the scripts from the parent directory:
C:\Users\Conda\ldm\stable-diffusion-main> python scripts\txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
... in this way the other interfaces have proper hierarchy.
Please, restore the repo and use in the expected fashion.
— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/261#issuecomment-1243014474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2XRUIXEQX2EBSKMYFX7ITV5YN4NANCNFSM6AAAAAAQJQ5XH4 . You are receiving this because you authored the thread.Message ID: @.***>
Moved forward from ModuleNotFoundError: No module named 'taming' (error below) I installed : (tf-gpu) C:\Users\Conda\HelloWorld> pip install taming-transformers and taming is imported
Now we have moved forward a little ore and get the following:
PS C:\Users\Conda\ldm\stable-diffusion-main> python scripts\txt2img.py
--prompt "a photograph of an astronaut riding a horse" --plms
Global seed set to 42
Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Global Step: 470000
Traceback (most recent call last):
File "C:\Users\Conda\ldm\stable-diffusion-main\scripts\txt2img.py", line
345, in
This looks a little "detailed" . How do I move forward again? Thanks
---------- Forwarded message --------- From: Bill Strum @.> Date: Sun, Sep 11, 2022 at 4:45 PM Subject: Re: [CompVis/stable-diffusion] ldm module not found in txt2img (Issue #261) To: CompVis/stable-diffusion < @.> Cc: CompVis/stable-diffusion @.>, Author < @.>
Slowly but hopefully surely we are moving forward.
Looks like a little progress but...
PS C:\Users\Conda\ldm\stable-diffusion-main> python scripts\txt2img.py
--prompt "a photograph of an astronaut riding a horse" --plms
Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Global Step: 470000
Traceback (most recent call last):
File "C:\Users\Conda\ldm\stable-diffusion-main\scripts\txt2img.py", line
345, in
What do I do now? Am I getting close??
On Sun, Sep 11, 2022 at 2:09 PM Rickey Bowers Jr. @.***> wrote:
The intent is to use the scripts from the parent directory:
C:\Users\Conda\ldm\stable-diffusion-main> python scripts\txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms
... in this way the other interfaces have proper hierarchy.
Please, restore the repo and use in the expected fashion.
— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/261#issuecomment-1243014474, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2XRUIXEQX2EBSKMYFX7ITV5YN4NANCNFSM6AAAAAAQJQ5XH4 . You are receiving this because you authored the thread.Message ID: @.***>
Your installation is incomplete.
After you install anaconda, you need to install git. Otherwise, conda env create -f environment.yaml
will not complete. Their directions are geared toward linux users, imho.
Did you notice an error at the end of environment creation, or is this another thing?
This was another thing. I forwarded the initial issue.
ImportError: cannot import name 'VectorQuantizer2' from 'taming.modules.vqvae.quantize' (C:\Users\Conda\envs\tf-gpu\lib\site-packages\taming\modules\vqvae\quantize.py)
I'm pretty deep into this as you can see. I went through the created environment and I dont think it worked.
Currently my development environment consists of starting conda pointing to the tf--gpu environment I have been currently using with great success on my tensor flow and torch projects
I launch the comda cmd prompt from conda and then launch pycharm
So if I do go back and try the create environment should I be an existenting env?
On Sun, Sep 11, 2022 at 7:36 PM Rickey Bowers Jr. @.***> wrote:
Your installation is complete.
After you install anaconda, you need to install git. Otherwise, conda env create -f environment.yaml will not complete. Their directions are geared toward linux users, imho.
Did you notice an error at the end of environment creation, or is this another thing?
— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/261#issuecomment-1243068508, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2XRUOGMISW5L2CYU7YGCTV5ZUH3ANCNFSM6AAAAAAQJQ5XH4 . You are receiving this because you authored the thread.Message ID: @.***>
Anaconda starts with a (base) environment, but being in another environment is fine as long as the git
command works. You can try it, and get a help message from git
.
Environment creation for stable diffusion will make another environment: (ldm). The name of which is defined at the top of: https://github.com/CompVis/stable-diffusion/blob/69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc/environment.yaml#L1
My current thinking is that you don't have git
. Which means you are very close to having it fixed. conda install -c anaconda git
It'll gather some info and install git, correcting the problem.
git clone https://github.com/CompVis/stable-diffusion monkey
cd monkey
copy ..\sd-v1-4.ckpt models/ldm/stable-diffusion-v1/model.ckpt
conda env create -f environment.yaml
conda activate ldm
python optimizedSD\optimized_img2img.py --skip_grid --from-file "..\prompts.txt" --init-img "..\init.png" --strength 0.79 --outdir ".." --W 1280 --H 1280 --ddim_steps 40 --scale 7.5 --n_samples 1
Assuming you wanted to run from the monkey
directory, and you've downloaded the model file into where the command prompt starts.
conda env remove -n ldm
first though to remove the previous attempt - that's broken.You were right. Idid not have git on my new computer.
I have installed git cloned the repo The contents of monkey are shown below
Directory of C:\Users\Conda\HelloWorld\monkey
09/12/2022 03:21 PM
and when I do the copy i get the following: (tf-gpu) C:\Users\Conda\HelloWorld\monkey>copy ..\sd-v1-4.ckpt models/ldm/stable-diffusion-v1/model.ckpt The system cannot find the file specified.
One step forward, one step back. Please advise
On Mon, Sep 12, 2022 at 2:28 PM Rickey Bowers Jr. @.***> wrote:
Anaconda starts with a (base) environment, but being in another environment is fine as long as the git command works. You can try it, and get a help message from git.
Environment creation for stable diffusion will create make another environment: (ldm). The name of which is defined at the top of:
My current thinking is that you don't have git. Which means you are very close to having it fixed. conda install -c anaconda git It'll gather some info and install git, correcting the problem.
git clone https://github.com/CompVis/stable-diffusion monkeycd monkeycopy ..\sd-v1-4.ckpt models/ldm/stable-diffusion-v1/model.ckpt conda env create -f environment.yaml conda activate ldm python optimizedSD\optimized_img2img.py --skip_grid --from-file "..\prompts.txt" --init-img "..\init.png" --strength 0.79 --outdir ".." --W 1280 --H 1280 --ddim_steps 40 --scale 7.5 --n_samples 1
Assuming you wanted to run from the monkey directory, and you've downloaded the model file into where the command prompt starts.
— Reply to this email directly, view it on GitHub https://github.com/CompVis/stable-diffusion/issues/261#issuecomment-1244133347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI2XRULLF5I2ELENJFNGHWLV55Y5BANCNFSM6AAAAAAQJQ5XH4 . You are receiving this because you authored the thread.Message ID: @.***>
Oh, so you haven't downloaded the model from HugginFace? It's a huge 4GB file - couldn't miss it:
https://github.com/CompVis/stable-diffusion#stable-diffusion-v1
Weights are here: https://huggingface.co/CompVis/stable-diffusion-v-1-4-original
The sd-v1-4.ckpt
file will need to be copied to the correct location, and renamed to model.ckpt
.
...and then it's smooth sailing.
(Other models will be release in time - sd-v1-5.ckpt is being tested for release.)
Such issues could be avoided by using a real programming language (compiled language instead interpreted) for CLI (Command Line Interface) applications.
If you want SD to use another language and it does not have to be Rust. Then perhaps let the developers know on my rather long rant about this issue: https://github.com/CompVis/stable-diffusion/issues/283
Yes, Python is showing it's age in this regard. It is a different ecosystem which comes with it's own learning curve beyond the language itself.
Such issues could be avoided by using a real programming language (compiled language instead interpreted) for CLI (Command Line Interface) applications.
But then again. I do not get how it works. Why did this person even bother to write this comment? Does he know that Rust is an actual compiled language and therefore no longer has the problems described in these comments? Or does he simply want to bash other languages without actually knowing what he is talking about?
FYI at least for me (linux on google cloud) using a symlink to the model.ckpt file didn't work. By copying the model with the proper name to the right folder (models/ldm/text2img-large/model.ckpt for example) it worked.
Anaconda starts with a (base) environment, but being in another environment is fine as long as the
git
command works. You can try it, and get a help message fromgit
.Environment creation for stable diffusion will make another environment: (ldm). The name of which is defined at the top of:
My current thinking is that you don't have
git
. Which means you are very close to having it fixed.conda install -c anaconda git
It'll gather some info and install git, correcting the problem.git clone https://github.com/CompVis/stable-diffusion monkey cd monkey copy ..\sd-v1-4.ckpt models/ldm/stable-diffusion-v1/model.ckpt conda env create -f environment.yaml conda activate ldm python optimizedSD\optimized_img2img.py --skip_grid --from-file "..\prompts.txt" --init-img "..\init.png" --strength 0.79 --outdir ".." --W 1280 --H 1280 --ddim_steps 40 --scale 7.5 --n_samples 1
Assuming you wanted to run from the
monkey
directory, and you've downloaded the model file into where the command prompt starts.You'll probably need to do
conda env remove -n ldm
first though to remove the previous attempt - that's broken.
Thanks this solution solves my problems
I am running windows 10 and using condo..
I have cloned the git CompVis/stable-diffusion C:\Users\Conda\ldm\stable-diffusion-main
After a long process I have all the modules installed
I get this when I try txt2img.py
PS C:\Users\Conda\ldm\stable-diffusion-main\scripts> python txt2img.py --prompt "a photograph of an astronaut riding a horse" --plms Traceback (most recent call last): File "C:\Users\Conda\ldm\stable-diffusion-main\scripts\txt2img.py", line 18, in
from ldm.util import instantiate_from_config
ModuleNotFoundError: No module named 'ldm'
Please advise