TypeError: __init__() got an unexpected keyword argument 'device_map'
See original GitHub issueI 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?
(sd-api-server) D:\stable-diffusion\ps_plugin\stable-diffusion-api-server>python server.py
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 543/543 [00:00<00:00, 118kB/s]
D:\anaconda3\envs\sd-api-server\lib\site-packages\huggingface_hub\file_download.py:123: UserWarning: `huggingface_hub` cache-system uses symlinks by default to efficiently store duplicated files but your machine does not support them in C:\Users\brian\.cache\huggingface\diffusers. Caching files will still work but in a degraded version that might require more space on your disk. This warning can be disabled by setting the `HF_HUB_DISABLE_SYMLINKS_WARNING` environment variable. For more details, see https://huggingface.co/docs/huggingface_hub/how-to-cache#limitations.
To support symlinks on Windows, you either need to activate Developer Mode or to run Python as an administrator. In order to see activate developer mode, see this article: https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development
warnings.warn(message)
Downloading: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 342/342 [00:00<00:00, 21.9kB/s]
Downloading: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 4.56k/4.56k [00:00<?, ?B/s]
Downloading: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1.22G/1.22G [00:22<00:00, 53.8MB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 209/209 [00:00<00:00, 163kB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 230/230 [00:00<00:00, 230kB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 592/592 [00:00<00:00, 587kB/s]
Downloading: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 492M/492M [00:09<00:00, 52.9MB/s]
Downloading: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 525k/525k [00:00<00:00, 1.32MB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 472/472 [00:00<00:00, 237kB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 806/806 [00:00<00:00, 587kB/s]
Downloading: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 1.06M/1.06M [00:00<00:00, 2.79MB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 743/743 [00:00<00:00, 743kB/s]
Downloading: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 3.44G/3.44G [01:04<00:00, 53.3MB/s]
Downloading: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 522/522 [00:00<00:00, 523kB/s]
Downloading: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 335M/335M [00:06<00:00, 54.4MB/s]
Fetching 16 files: 100%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 16/16 [01:58<00:00, 7.41s/it]
Traceback (most recent call last):
File "server.py", line 108, in <module>
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 "D:\anaconda3\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 "D:\anaconda3\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'
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top Results From Across the Web
python - TypeError: __init__() got an unexpected keyword ...
The problem is that Django 4.0 does not have any providing_args parameter, so the signal is declared this way. from django.dispatch importΒ ...
Read more >TypeError: init() got an unexpected keyword argument 'seed' #29
I got this error message when running fm = pywFM.FM(task='regression', k2=2, seed=seed). TypeError Traceback (most recent call last)
Read more >gcloud error while updating google-cloud-sdk on centos 7
ERROR: gcloud crashed (TypeError): __init__() got an unexpected keyword argument 'completer'. Here's more from the update ouptut:.
Read more >init__() got an unexpected keyword argument 'max_iter'?
TypeError : init() got an unexpected keyword argument 'max_iter'. I m running the linear regression code in Community edition. Google says reinstall --....
Read more >TypeError: __init__() got an unexpected keyword argument ...
Hi, I have followed the steps given in the chapter to set up mflix app. ... TypeError: init() got an unexpected keyword argument...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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β¦