Closed aniketgore closed 1 year ago
Same here
I solved this by using the ldm environment from https://github.com/CompVis/stable-diffusion + installing Flask.
Do you mean you installed above repo and built the environment? Can you provide the steps you followed? Thanks in advance.
I already had the ldm environment installed and used it with this repo, so maybe just use the environment.yaml from CompVis. maybe the diffusers were missing.
Correct me if I'm wrong. You moved the server.py to the compvis SD folder and run it there?
no, make a new environment with the compvis yaml, activate the environment (conda activate ldm) and stay in the directory of this repo. at least this worked for me.
Didn't work for me even after cloning and using the compvis repo
I left a step out of the instructions. You also need to agree to share your email address with Hugging Face in order to download the model. Please see the new Hugging Face instructions in the README.
Also, don't forget your token.txt
file.
I apologize for leaving out a critical step. I agreed to it ages ago, and I didn't realize that my agreement was associated with my HF token so everything was working for me.
If that doesn't fix it, please reopen.
I've already downloaded the model multiple times from the site so I'd selected that option. Do I need to select it somewhere else as well?
Ran into the same issue - getting the latest transformers version fixed it for me:
pip install transformers==4.23.1
(or directly change the pinned version in environment.yaml
)
File "server.py", line 108, in
manager.add_engine( 'txt2img', EngineStableDiffusion( diffusers.StableDiffusionPipeline, sibling=None ) )
File "server.py", line 62, in init
self.engine = pipe.from_pretrained( 'CompVis/stable-diffusion-v1-4', use_auth_token=token.strip() )
File "C:\Users\anike.conda\envs\sd-api-server\lib\site-packages\diffusers\pipeline_utils.py", line 517, in from_pretrained
loaded_sub_model = load_method(os.path.join(cached_folder, name), *loading_kwargs)
File "C:\Users\anike.conda\envs\sd-api-server\lib\site-packages\transformers\modeling_utils.py", line 2024, in from_pretrained
model = cls(config, model_args, **model_kwargs)
TypeError: init() got an unexpected keyword argument 'device_map'