Skip to content

[Bug]: handrefinerportable: cannot import 'setuptools.build_meta' #3081

@svnsnln

Description

@svnsnln

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?

After installing ControlNet, whenever I start Stable Diffusion, the installation of handrefinerportable==2024.2.12.0 begins. However, it always fails with the following error message:

Cannot import 'setuptools.build_meta'

I have already tried reinstalling ControlNet, but the error persists.

Steps to reproduce the problem

  1. Install ControlNet.
  2. Start Stable Diffusion: run.bat
  3. The installation of handrefinerportable==2024.2.12.0 begins.
  4. The error occurs: Cannot import 'setuptools.build_meta'.

What should have happened?

The installation of handrefinerportable should complete successfully without errors.

Commit where the problem happens

webui: 1.10.1
controlnet: 56cec5b

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

set COMMANDLINE_ARGS= --xformers --medvram --theme dark

List of enabled extensions

Image

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Installing sd-webui-controlnet requirement: handrefinerportable
Couldn't install sd-webui-controlnet requirement: handrefinerportable.
Command: "D:\Stable Diffusion\system\python\python.exe" -m pip install -U https://github.com/huchenlei/HandRefinerPortable/releases/download/v1.0.1/handrefinerportable-2024.2.12.0-py2.py3-none-any.whl --prefer-binary
Error code: 2
stdout: Collecting handrefinerportable==2024.2.12.0
  Downloading https://github.com/huchenlei/HandRefinerPortable/releases/download/v1.0.1/handrefinerportable-2024.2.12.0-py2.py3-none-any.whl (13.1 MB)
     -------------------------------------- 13.1/13.1 MB 866.5 kB/s eta 0:00:00
Requirement already satisfied: mediapipe in d:\stable diffusion\system\python\lib\site-packages (from handrefinerportable==2024.2.12.0) (0.10.21)
Collecting rtree (from handrefinerportable==2024.2.12.0)
  Using cached rtree-1.4.0-py3-none-win_amd64.whl.metadata (2.1 kB)
Collecting trimesh[easy] (from handrefinerportable==2024.2.12.0)
  Using cached trimesh-4.6.6-py3-none-any.whl.metadata (18 kB)
Requirement already satisfied: absl-py in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (2.2.0)
Requirement already satisfied: attrs>=19.1.0 in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (25.3.0)
Requirement already satisfied: flatbuffers>=2.0 in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (25.2.10)
Requirement already satisfied: jax in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (0.5.3)
Requirement already satisfied: jaxlib in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (0.5.3)
Requirement already satisfied: matplotlib in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (3.10.1)
Requirement already satisfied: numpy<2 in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (1.26.2)
Requirement already satisfied: opencv-contrib-python in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (4.11.0.86)
Collecting protobuf<5,>=4.25.3 (from mediapipe->handrefinerportable==2024.2.12.0)
  Using cached protobuf-4.25.6-cp310-abi3-win_amd64.whl.metadata (541 bytes)
Requirement already satisfied: sounddevice>=0.4.4 in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (0.5.1)
Requirement already satisfied: sentencepiece in d:\stable diffusion\system\python\lib\site-packages (from mediapipe->handrefinerportable==2024.2.12.0) (0.2.0)
Collecting colorlog (from trimesh[easy]->handrefinerportable==2024.2.12.0)
  Using cached colorlog-6.9.0-py3-none-any.whl.metadata (10 kB)
Collecting manifold3d>=2.3.0 (from trimesh[easy]->handrefinerportable==2024.2.12.0)
  Using cached manifold3d-3.0.1-cp310-cp310-win_amd64.whl.metadata (17 kB)
Requirement already satisfied: charset-normalizer in d:\stable diffusion\system\python\lib\site-packages (from trimesh[easy]->handrefinerportable==2024.2.12.0) (3.4.1)
Requirement already satisfied: lxml in d:\stable diffusion\system\python\lib\site-packages (from trimesh[easy]->handrefinerportable==2024.2.12.0) (5.3.1)
Requirement already satisfied: jsonschema in d:\stable diffusion\system\python\lib\site-packages (from trimesh[easy]->handrefinerportable==2024.2.12.0) (4.23.0)
Requirement already satisfied: networkx in d:\stable diffusion\system\python\lib\site-packages (from trimesh[easy]->handrefinerportable==2024.2.12.0) (3.4.2)
Collecting svg.path (from trimesh[easy]->handrefinerportable==2024.2.12.0)
  Using cached svg.path-6.3-py2.py3-none-any.whl.metadata (13 kB)
Collecting pycollada (from trimesh[easy]->handrefinerportable==2024.2.12.0)
  Using cached pycollada-0.9.tar.gz (109 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'

stderr: ERROR: Exception:
Traceback (most recent call last):
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\cli\base_command.py", line 106, in _run_wrapper
    status = _inner_run()
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\cli\base_command.py", line 97, in _inner_run
    return self.run(options, args)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\cli\req_command.py", line 67, in wrapper
    return func(self, options, args)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\commands\install.py", line 386, in run
    requirement_set = resolver.resolve(
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
    result = self._result = resolver.resolve(
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 427, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 239, in _attempt_to_pin_criterion
    criteria = self._get_updated_criteria(candidate)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 230, in _get_updated_criteria
    self._add_to_criteria(criteria, requirement, parent=candidate)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
    return bool(self._sequence)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 174, in __bool__
    return any(self)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 162, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 53, in _iter_built
    candidate = func()
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 187, in _make_candidate_from_link
    base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 233, in _make_base_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 304, in __init__
    super().__init__(
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 159, in __init__
    self.dist = self._prepare()
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 236, in _prepare
    dist = self._prepare_distribution()
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 315, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\operations\prepare.py", line 527, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\operations\prepare.py", line 642, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\operations\prepare.py", line 72, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\distributions\sdist.py", line 56, in prepare_distribution_metadata
    self._install_build_reqs(finder)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\distributions\sdist.py", line 126, in _install_build_reqs
    build_reqs = self._get_build_requires_wheel()
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\distributions\sdist.py", line 103, in _get_build_requires_wheel
    return backend.get_requires_for_build_wheel()
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_internal\utils\misc.py", line 702, in get_requires_for_build_wheel
    return super().get_requires_for_build_wheel(config_settings=cs)
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 196, in get_requires_for_build_wheel
    return self._call_hook(
  File "D:\Stable Diffusion\system\python\lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 402, in _call_hook
    raise BackendUnavailable(
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'

Warning: Failed to install handrefinerportable. Some processors will not work.

Additional information

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions