Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TypeError: FaceAnalysis.__init__() got an unexpected keyword argument 'providers' #3070

Open
1 task done
renjixiang opened this issue Dec 1, 2024 · 0 comments
Open
1 task done

Comments

@renjixiang
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

What happened?

MacBook Pro M1 system 13.7.1
Browser: Chrome
ControlNet preview using InstantID reports [TypeError: FaceAnalysis.init() got an unexpected keyword argument 'providers'] error
(Other models preview no problem)

Steps to reproduce the problem

  1. Enable ControlNet
  2. Click InstantID
  3. Upload an image
  4. Select the model control_instant_id_sdxl [c5c25a50]
  5. Click Preview
  6. Error TypeError: FaceAnalysis.init() got an unexpected keyword argument 'providers'

What should have happened?

Show the preview effect of InstantID

Commit where the problem happens

webui: AUTOMATIC1111[v1.10.1]  •  python: 3.10.10  •  torch: 2.3.1  •  xformers: N/A  •  gradio: 3.41.2  
controlnet: v1.1.455

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

./webui.sh

List of enabled extensions

WX20241202-000054@2x

Console logs

2024-12-01 22:57:15,492 - ControlNet - INFO - [inpaint_only.processor_res] Invalid value(512), using default value 0.5.
2024-12-01 22:57:15,532 - ControlNet - INFO - [inpaint_only.processor_res] Invalid value(512), using default value 0.5.
2024-12-01 22:57:16,999 - ControlNet - INFO - [instant_id_face_keypoints.processor_res] Invalid value(0), using default value 512.
2024-12-01 22:57:17,033 - ControlNet - INFO - [instant_id_face_keypoints.processor_res] Invalid value(0), using default value 512.
2024-12-01 22:57:17,035 - ControlNet - INFO - [instant_id_face_keypoints.processor_res] Invalid value(0), using default value 512.
2024-12-01 22:57:19,892 - ControlNet - INFO - Preview Resolution = 512
Traceback (most recent call last):
  File "/Users/jixiang/Desktop/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/Users/jixiang/Desktop/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/Users/jixiang/Desktop/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/Users/jixiang/Desktop/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/Users/jixiang/Desktop/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/Users/jixiang/Desktop/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/Users/jixiang/Desktop/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "/Users/jixiang/Desktop/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet_ui/controlnet_ui_group.py", line 951, in run_annotator
    result = preprocessor.cached_call(
  File "/Users/jixiang/Desktop/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 198, in cached_call
    result = self._cached_call(input_image, *args, **kwargs)
  File "/Users/jixiang/Desktop/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 82, in decorated_func
    return cached_func(*args, **kwargs)
  File "/Users/jixiang/Desktop/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 66, in cached_func
    return func(*args, **kwargs)
  File "/Users/jixiang/Desktop/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/supported_preprocessor.py", line 211, in _cached_call
    return self(*args, **kwargs)
  File "/Users/jixiang/Desktop/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/legacy/legacy_preprocessors.py", line 105, in __call__
    result, is_image = self.call_function(
  File "/Users/jixiang/Desktop/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/legacy/processor.py", line 744, in run_model_instant_id
    self.load_model()
  File "/Users/jixiang/Desktop/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/preprocessor/legacy/processor.py", line 688, in load_model
    self.model = FaceAnalysis(
TypeError: FaceAnalysis.__init__() got an unexpected keyword argument 'providers'

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant