Open houdinii opened 1 year ago
Having the same issue when using the MPS fallback method; to get the server working w the PyTorch nightlies method try installing optimum via pip: python -m pip install git+https://GitHub.com/huggingface/optimum.git
Got exactly the same as @houdinii (on Windows). Any suggestion would be very welcome!
Updating the transformers package solved the issue for me:
https://github.com/cantrell/stable-diffusion-api-server/issues/2#issuecomment-1279479888
@robertsehlke 's suggestion works! This means that (in windows) we need to edit line 14 of the environment.yaml file from "4.19.2" to "4.23.1"
Downloading: 100%|██████████████████████████████| 472/472 [00:00<00:00, 108kB/s]
Downloading: 100%|██████████████████████████████| 806/806 [00:00<00:00, 111kB/s]
Downloading: 100%|█████████████████████████| 1.06M/1.06M [00:00<00:00, 1.38MB/s]
Downloading: 100%|██████████████████████████████| 743/743 [00:00<00:00, 184kB/s]
Downloading: 100%|█████████████████████████| 3.44G/3.44G [01:30<00:00, 37.9MB/s]
Downloading: 100%|██████████████████████████████| 522/522 [00:00<00:00, 142kB/s]
Downloading: 100%|███████████████████████████| 335M/335M [00:16<00:00, 20.0MB/s]
Fetching 16 files: 100%|████████████████████████| 16/16 [03:01<00:00, 11.35s/it]
ftfy or spacy is not installed using BERT BasicTokenizer instead of ftfy.
Traceback (most recent call last):
File "/Users/bamboozle/Downloads/stable-diffusion-api-server-main/server.py", line 108, in <module>
manager.add_engine( 'txt2img', EngineStableDiffusion( diffusers.StableDiffusionPipeline, sibling=None ) )
File "/Users/bamboozle/Downloads/stable-diffusion-api-server-main/server.py", line 62, in __init__
self.engine = pipe.from_pretrained( 'CompVis/stable-diffusion-v1-4', use_auth_token=token.strip() )
File "/Users/bamboozle/opt/miniconda3/envs/sd-api-server/lib/python3.9/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 "/Users/bamboozle/opt/miniconda3/envs/sd-api-server/lib/python3.9/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'
(sd-api-server) ➜ stable-diffusion-api-server-main
Installing https://github.com/huggingface/optimum directly via pip resolved the unexpected keyword argument 'device_map'
for me as well (which also updated to transformers-4.23.1), but two issues remain:
Fetching 16 files
starts at 100% and downloads nothing. A prior attempt did download the 16 files, I think, but that was before resolving the above issue. When I deleted the environment and started from scratch, this no longer attempts to download at all. Does it download to a different directory and I can't find it? Token is definitely valid and terms accepted, fyi. ftfy or spacy is not installed using BERT BasicTokenizer instead of ftfy.
I doubt those two things are related, but as of now not having success.
Having the same issue when using the MPS fallback method; to get the server working w the PyTorch nightlies method try installing optimum via pip: python -m pip install git+https://GitHub.com/huggingface/optimum.git
this made it work for me too! but its soooooo slow to generate an image....
I installed the plugin and server this afternoon, and it's immediately failing after downloading the requirements from Hugginface. I'm personally at a loss on how to fix it. Do you have any ideas?