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]: "webui-user.bat" can't install - Torch and Torchvision can't be installed automatically #10496

Closed
1 task done
MafiapauCZE opened this issue May 18, 2023 · 3 comments
Closed
1 task done
Labels
not-an-issue This issue is not with the repo itself.

Comments

@MafiapauCZE
Copy link

MafiapauCZE commented May 18, 2023

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

Torch and Torchvision can't be installed automatically tru webui-user.bat normal instalation.
CMD will start to automatically download Torch and Torchvision, but after finishing the download, lot of red text will appear (log) and installation is ruined.
I got python 3.10.6 and pip 23.1.2 (which "webui-user.bat" wants from me)
I'm no coder and i first encountered with python, pip etc..
Just wanna generate come chicks via AI ( ͡° ͜ʖ ͡°).
Got "stable-diffusion-webui-master" folder on my secondary HDD, because my primary SSD is too small for even the Win10 (running Win10 now, but with just 10GB of free space [it's 60GB SSD :,])

Steps to reproduce the problem

Just start the "webui-user.bat"

What should have happened?

Torch and Torchvision should be installed and installation should continue as planned.

Commit where the problem happens

i don't know what commit is.

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

Idk what extensions, if extensions in google chrome, then yes, but i still didn't pass that instalation process once so, iddk how internet browser fits in all this.

Console logs

venv "D:\Programy\stable-diffusion-webui-master\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: <none>
Commit hash: <none>
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
Collecting torch==2.0.1
  Downloading https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp310-cp310-win_amd64.whl (2619.1 MB)
     ---------------------------------------  2.6/2.6 GB 8.3 MB/s eta 0:00:01
ERROR: Exception:
Traceback (most recent call last):
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 169, in exc_logging_wrapper
    status = run_func(*args)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\cli\req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\commands\install.py", line 377, in run
    requirement_set = resolver.resolve(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
    if not criterion.candidates:
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
    return bool(self._sequence)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
    return any(self)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
    candidate = func()
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 206, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 293, in __init__
    super().__init__(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
    self.dist = self._prepare()
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 225, in _prepare
    dist = self._prepare_distribution()
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 304, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 516, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 587, in _prepare_linked_requirement
    local_file = unpack_url(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 166, in unpack_url
    file = get_http_url(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\operations\prepare.py", line 107, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\network\download.py", line 147, in __call__
    for chunk in chunks:
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\cli\progress_bars.py", line 53, in _rich_progress_bar
    for chunk in iterable:
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_internal\network\utils.py", line 63, in response_chunks
    for chunk in response.raw.stream(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 622, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 561, in read
    data = self._fp_read(amt) if not fp_closed else b""
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\urllib3\response.py", line 527, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 96, in read
    self._close()
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 76, in _close
    self.__callback(result)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\cachecontrol\controller.py", line 353, in cache_response
    self._cache_set(cache_url, request, response, body, expires_time)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\cachecontrol\controller.py", line 274, in _cache_set
    self.serializer.dumps(request, response, body),
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\cachecontrol\serialize.py", line 70, in dumps
    return b",".join([b"cc=4", msgpack.dumps(data, use_bin_type=True)])
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\msgpack\__init__.py", line 38, in packb
    return Packer(**kwargs).pack(o)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 883, in pack
    self._pack(obj)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 862, in _pack
    return self._pack_map_pairs(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 968, in _pack_map_pairs
    self._pack(v, nest_limit - 1)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 862, in _pack
    return self._pack_map_pairs(
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 968, in _pack_map_pairs
    self._pack(v, nest_limit - 1)
  File "D:\Programy\stable-diffusion-webui-master\venv\lib\site-packages\pip\_vendor\msgpack\fallback.py", line 821, in _pack
    return self._buffer.write(obj)
MemoryError
Traceback (most recent call last):
  File "D:\Programy\stable-diffusion-webui-master\launch.py", line 369, in <module>
    prepare_environment()
  File "D:\Programy\stable-diffusion-webui-master\launch.py", line 271, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "D:\Programy\stable-diffusion-webui-master\launch.py", line 95, in run
    raise RuntimeError(f"""{errdesc or 'Error running command'}.
RuntimeError: Couldn't install torch.
Command: "D:\Programy\stable-diffusion-webui-master\venv\Scripts\python.exe" -m pip install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118
Error code: 2
Press any key to continue . . .

Additional information

im absolute noob in coding, cmd and python so please, don't chew your usb cables cos me.

@MafiapauCZE MafiapauCZE added the bug-report Report of a bug, yet to be confirmed label May 18, 2023
@missionfloyd
Copy link
Collaborator

missionfloyd commented May 18, 2023

How much RAM do you have? MemoryError means there isn't enough available.

Try this: open webui-user.bat in Notepad and add set TORCH_COMMAND=pip --no-cache-dir install torch==2.0.1 torchvision==0.15.2 --extra-index-url https://download.pytorch.org/whl/cu118 anywhere before call webui.bat.

You could also try closing all other programs or restarting your computer.

@Sakura-Luna Sakura-Luna added not-an-issue This issue is not with the repo itself. and removed bug-report Report of a bug, yet to be confirmed labels May 18, 2023
@MafiapauCZE
Copy link
Author

MafiapauCZE commented May 18, 2023

Thanks for your tip, it really needed just restart and install did proceed (that didn't pop up in my mind in 5am :D)
But another problem appeared - picture
I got "model.ckpt" file in "\stable-diffusion-webui-master\models\Stable-diffusion" directory downloaded from huggingface.co.

downloaded "v1-5-pruned-emaonly.ckpt - 4.27GB, ema-only weight. uses less VRAM - suitable for inference".

After trying that IP in google chrome, it opened the UI, but after that, in i saw in CMD this - picture

Also, after trying of manually loading the model in the UI in Chrome, after over a minute, my gpu kinda reloaded (windows almost crashed) and in CMD i saw this - https://i.imgur.com/sXgdawV.png

In case of wondering, i got i7-3770, 8GB ram 1600MHz, GTX 660 TI, PSU 750W, MB ASUS H61M-K. (you can start laughing now..)

@MafiapauCZE
Copy link
Author

Update after some testing:
It really looks like i just got too low RAM and VRAM memory so, i will close this thread, and in the next few weeks,
i should have GTX 970 4GB/6GB.
Thank you for your help.

@MafiapauCZE MafiapauCZE closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-an-issue This issue is not with the repo itself.
Projects
None yet
Development

No branches or pull requests

3 participants