Fwd: The installation of “Stable Diffusion web UI” natively on FreeBSD fails because can’t install torch and torchvision

2022-11-19 Thread Mario Marietto
Hello to everyone.

I’m trying to clone and install the “*Stable Diffusion web UI*” on
FreeBSD,following this mini tutorial :


GitHub - AUTOMATIC/stable-diffusion-webui: Stable Diffusion web UI



This is what I came up with :


[marietto@marietto ~/Desktop/Files]$ git clone
https://github.com/AUTOMATIC/stable-diffusion-webui

[marietto@marietto ~/Desktop/Files]$ cd stable-diffusion-webui

[marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ sudo pkg
install py39-pytorchvideo

[marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ mkdir venv

[marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ python3 -m venv venv

[marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ . venv/bin/activate

(venv) [marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$
python3 -m pip install torch torchvision==0.13.1+cu113
--extra-index-url https://download.pytorch.org/whl/cu113
Looking in indexes:
https://pypi.org/simple,https:/download.pytorch.org/whl/cu113
ERROR: Could not find a version that satisfies the requirement torch
(from versions: none)
ERROR: No matching distribution found for torch


The script works up to a point and then devolves into stuff that I don’t
think has much to do with FreeBSD. The venv gets created and the failure
doesn’t happen until the very end of the script (where the app would take
over).

Also just activating the virtual environment and manually running
[launch.py] seems to result in the same error, which really looks to be an
issue with the world of python…

https://pastebin.com/raw/jTNQ62dM

Apparently it’s trying to install pytorch but can’t. I don’t know what to
do next.
-- 
Mario.


Re: The installation of “Stable Diffusion web UI” natively on FreeBSD fails because can’t install torch and torchvision

2022-11-19 Thread Tomek CEDRO
On Sat, Nov 19, 2022 at 4:18 PM Mario Marietto wrote:
> Hello to everyone.
> I’m trying to clone and install the “Stable Diffusion web UI” on 
> FreeBSD,following this mini tutorial :
> [marietto@marietto ~/Desktop/Files]$ git clone 
> https://github.com/AUTOMATIC/stable-diffusion-webui
> [marietto@marietto ~/Desktop/Files]$ cd stable-diffusion-webui
> [marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ sudo pkg install 
> py39-pytorchvideo

For me that would install version 0.1.5 of the package:

octagon% pkg search py39-pytorch
py39-pytorchvideo-0.1.5Video understanding deep learning library


> [marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ mkdir venv
> [marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ python3 -m venv 
> venv
> [marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ . 
> venv/bin/activate

You dont have to create  a directory, it will be created by venv :-)

Also proper execution of venv would be:
./venv/bin/activate

Then you should see a shell prompt prefix `(venv) $` and you can make
sure if you are in the venv by running `which python3` if that shows
your venv then all if fine.


> (venv) [marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ python3 -m 
> pip install torch torchvision==0.13.1+cu113 --extra-index-url 
> https://download.pytorch.org/whl/cu113
>
> Looking in indexes: 
> https://pypi.org/simple,https:/download.pytorch.org/whl/cu113
>
> ERROR: Could not find a version that satisfies the requirement torch (from 
> versions: none)
>
> ERROR: No matching distribution found for torch

In my case:

(venv3.9embedded) pip install torch==
ERROR: Could not find a version that satisfies the requirement torch==
(from versions: none)
ERROR: No matching distribution found for torch==

(venv3.9embedded) pip install torchvision==
ERROR: Could not find a version that satisfies the requirement
torchvision== (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0,
0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3)
ERROR: No matching distribution found for torchvision==

Using `==` as the package suffix to the package name will list all
available versions.

It seems that package for torch is not avilable for pip, while there
are torchvision packages available in versions: 0.1.6, 0.1.7, 0.1.8,
0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3 (not the
0.13.1+cu113 that you need).

Because both torch and torchvision are not available for download (and
in version that you need) I would clone the source code repo and build
it + install from that repo (being inside venv of course).

Please note that most folks unfortunately does not provide precompiled
binary modules for FreeBSD, so you will have to build them from the
sources (it will be done by pip when no binary package is available).
Also some packages may not build correctly out of the box on FreeBSD
and you will have to clone that specific repo, find a fix, then
provide a fix to the upstream.

This also may be a good time to mention public pip availability of the
packages to the upstream :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



Re: The installation of “Stable Diffusion web UI” natively on FreeBSD fails because can’t install torch and torchvision

2022-11-19 Thread Tomek CEDRO
On Sat, Nov 19, 2022 at 5:32 PM Tomek CEDRO  wrote:
> (venv3.9embedded) pip install torchvision==
> ERROR: Could not find a version that satisfies the requirement
> torchvision== (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0,
> 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3)
> ERROR: No matching distribution found for torchvision==
>
> Using `==` as the package suffix to the package name will list all
> available versions.
>
> It seems that package for torch is not avilable for pip, while there
> are torchvision packages available in versions: 0.1.6, 0.1.7, 0.1.8,
> 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3 (not the
> 0.13.1+cu113 that you need).
>
> Because both torch and torchvision are not available for download (and
> in version that you need) I would clone the source code repo and build
> it + install from that repo (being inside venv of course).
>
> Please note that most folks unfortunately does not provide precompiled
> binary modules for FreeBSD, so you will have to build them from the
> sources (it will be done by pip when no binary package is available).
> Also some packages may not build correctly out of the box on FreeBSD
> and you will have to clone that specific repo, find a fix, then
> provide a fix to the upstream.
>
> This also may be a good time to mention public pip availability of the
> packages to the upstream :-)

If you look at https://download.pytorch.org/whl/cu113

Then you will see:
1. https://download.pytorch.org/whl/torch/
2. https://download.pytorch.org/whl/torchvision/

..and none of them contains pre-built binaries for FreeBSD (or any
other BSD) just for win linux and mac.. this is standard
unfortunately.

If the upstream provided at least source releases on pypi they would
have been available to download and local build by pip on any OS.

Right now you need to clone project repositories, checkout selected
version (or stay with master if that works), and build + install from
the cloned repo using venv.

Please remember to check with `which python3` if you are inside python
venv. Otherwise you would use system level python and system level
python packages / modules which is not desired to be modified by user.
Make sure you are building and installing local packages indise local
venv.

Good luck and Have fun! :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



Re: The installation of “Stable Diffusion web UI” natively on FreeBSD fails because can’t install torch and torchvision

2022-11-19 Thread Tomek CEDRO
>From the /usr/ports/math/py-pytorchvideo/Makefile is seems that
MAINTAINER= ports[at]FreeBSD.org so someone on this list created the
port.

If both torch and torchvision builds fine on FreeBSD then creating a
system wide port for them should be easy so everyone would have acces
to these packages :-)

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



Re: The installation of “Stable Diffusion web UI” natively on FreeBSD fails because can’t install torch and torchvision

2022-11-19 Thread Mario Marietto
Thanks. Yours seem to be very detailed instructions. Unfortunately I'm not
so experienced to understand what to do. Thanks anyway for your kindness.

Il giorno sab 19 nov 2022 alle ore 17:45 Tomek CEDRO  ha
scritto:

> From the /usr/ports/math/py-pytorchvideo/Makefile is seems that
> MAINTAINER= ports[at]FreeBSD.org so someone on this list created the
> port.
>
> If both torch and torchvision builds fine on FreeBSD then creating a
> system wide port for them should be easy so everyone would have acces
> to these packages :-)
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>


-- 
Mario.


Re: The installation of “Stable Diffusion web UI” natively on FreeBSD fails because can’t install torch and torchvision

2022-11-19 Thread Tomek CEDRO
On Sat, Nov 19, 2022 at 6:06 PM Mario Marietto  wrote:
> Thanks. Yours seem to be very detailed instructions. Unfortunately I'm not so 
> experienced to understand what to do. Thanks anyway for your kindness.

No worries we all learn all the time.. just take some time and it will
eventually work :-)

You may want to clone the PYTORCH repo and try to build on FreeBSD:

https://github.com/pytorch/pytorch

This is very popular AI framework, but I did not use it yet, so I have
no experience sorry.. maybe someone on the list would have some
experience in PYTORCH on FreeBSD and/or would be interested in
creating PyTORCH and PyTORCHVISION ports?

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



Unmaintained FreeBSD ports which are out of date

2022-11-19 Thread portscout
Dear port maintainers,

The portscout new distfile checker has detected that one or more
unmaintained ports appears to be out of date. Please take the opportunity
to check each of the ports listed below, and if possible and appropriate,
submit/commit an update. Please consider also adopting this port.
If any ports have already been updated, you can safely ignore the entry.

An e-mail will not be sent again for any of the port/version combinations
below.

Full details can be found at the following URL:
http://portscout.freebsd.org/po...@freebsd.org.html


Port| Current version | New version
+-+
devel/binaryen  | 105 | version_111
+-+
finance/moneymanagerex  | 1.2.7   | v1.6.1
+-+
games/retroarch | 1.10.3  | v1.13.0
+-+


If any of the above results are invalid, please check the following page
for details on how to improve portscout's detection and selection of
distfiles on a per-port basis:

http://portscout.freebsd.org/info/portscout-portconfig.txt

Reported by:portscout!



Re: The installation of “Stable Diffusion web UI” natively on FreeBSD fails because can’t install torch and torchvision

2022-11-19 Thread Mario Marietto
I tried to do something like this :

(venv) [marietto@marietto ~/Desktop/Files/stable-diffusion-webui]$ python3
-m pip install pytorch
Collecting pytorch
 Downloading pytorch-1.0.2.tar.gz (689 bytes)
 Preparing metadata (setup.py) ... done
Installing collected packages: pytorch
 DEPRECATION: pytorch is being installed using the legacy 'setup.py
install' method, because it doe
s not have a 'pyproject.toml' and the 'wheel' package is not installed. pip
23.1 will enforce this b
ehaviour change. A possible replacement is to enable the '--use-pep517'
option. Discussion can be fo
und at https://github.com/pypa/pip/issues/8559
 Running setup.py install for pytorch ... error
 error: subprocess-exited-with-error

 × Running setup.py install for pytorch did not run successfully.
 │ exit code: 1
 ╰─> [6 lines of output]
 Traceback (most recent call last):
   File "", line 2, in 
   File "", line 34, in 
   File
"/tmp/pip-install-yfgsmj5x/pytorch_628b1eae21ac41e48637a8e3262676de/setup.py",
line 11,
in 
 raise Exception(message)
 Exception: You tried to install "pytorch". The package named for
PyTorch is "torch"
 [end of output]

 note: This error originates from a subprocess, and is likely not a problem
with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pytorch

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.



Il giorno sab 19 nov 2022 alle ore 18:49 Tomek CEDRO  ha
scritto:

> On Sat, Nov 19, 2022 at 6:06 PM Mario Marietto  wrote:
> > Thanks. Yours seem to be very detailed instructions. Unfortunately I'm
> not so experienced to understand what to do. Thanks anyway for your
> kindness.
>
> No worries we all learn all the time.. just take some time and it will
> eventually work :-)
>
> You may want to clone the PYTORCH repo and try to build on FreeBSD:
>
> https://github.com/pytorch/pytorch
>
> This is very popular AI framework, but I did not use it yet, so I have
> no experience sorry.. maybe someone on the list would have some
> experience in PYTORCH on FreeBSD and/or would be interested in
> creating PyTORCH and PyTORCHVISION ports?
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>


-- 
Mario.


Re: The installation of “Stable Diffusion web UI” natively on FreeBSD fails because can’t install torch and torchvision

2022-11-19 Thread Ronald Klop

On 11/19/22 17:45, Tomek CEDRO wrote:

 From the /usr/ports/math/py-pytorchvideo/Makefile is seems that
MAINTAINER= ports[at]FreeBSD.org so someone on this list created the
port.



Well, this actually means the port has no maintainer so all mail goes to the 
mailing list. Often this happens when the creator of the port does not have the 
possibility to maintain it anymore and no new maintainer is found.

Regards,
Ronald.



If both torch and torchvision builds fine on FreeBSD then creating a
system wide port for them should be easy so everyone would have acces
to these packages :-)