TencentARC / PhotoMaker

PhotoMaker [CVPR 2024]
https://photo-maker.github.io/
Other
9.58k stars 768 forks source link

installation problem! #25

Open one-pip opened 10 months ago

one-pip commented 10 months ago

Requirement already satisfied: torch==2.0.1 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (2.0.1) Requirement already satisfied: torchvision==0.15.2 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (0.15.2) ERROR: Could not find a version that satisfies the requirement pytorch-cuda==11.8 (from versions: none) ERROR: No matching distribution found for pytorch-cuda==11.8

what is this problem?

SarthkK commented 10 months ago

try running this command : pip3 install torch torchvision

romim998 commented 10 months ago

Having the same here erro

Kallamamran commented 10 months ago

It's dependent on what version of python you're running. I was running 3.8 since it was recommended in the ReadMe. Unfortunately 3.9 or even 3.10 is better.

Running 3.8 I had to run "pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118" to make it work

Trying now with python 3.10.9 I get the same error and need to runt this same command 🤔

chille9 commented 10 months ago

This is something that so many people will run into that a simple explanation of how to install should definitely be included in projects install description.

Also having this issue despite re-installing MANY different versions of python and torch.

chille9 commented 10 months ago

Running 3.8 I had to run "pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118" to make it work

This command doesnt seem to make any difference for me. Tried on python version 3.8 and 3.9 and 3.10.

chille9 commented 10 months ago

Guys I found the solution as provided by a kind member!!! Use this! :)

"I have modified the windows installation instructions an re-arranged some of the files in the repo to make it work easilly on Windows: https://github.com/bmaltais/PhotoMaker"

step 2 DO THIS AS WELL. (Only if it doesnt work with step 1)

"Use python 3.10 or add these line in app.py :

add this line at the top ---> from typing import Tuple

find this line ---> def apply_style(style_name: str, positive: str, negative: str = "") -> tuple[str, str]:

and replace with this one ---> def apply_style(style_name: str, positive: str, negative: str = "") -> Tuple[str, str]:

it works for me :) "

one-pip commented 10 months ago

Guys I found the solution as provided by a kind member!!! Use this!

"I have modified the windows installation instructions an re-arranged some of the files in the repo to make it work easilly on Windows: https://github.com/bmaltais/PhotoMaker"

It seems to be installed, but it crashes when running GUI.BAT. ​

qaisarehman commented 10 months ago

so far i have used the above repo for setting up the photo maker and it works, the GUI launched.

Nuclear6 commented 10 months ago

My ubuntu system is version 20, and the cuda version is 12.3. After I removed pytorch-cuda==11.8 from requirements.txt, it can still run normally. I followed the tutorial to modify the original image.

Paper99 commented 10 months ago

Hello everyone, first of all, thank you for your discussions, which helped us fix many known issues in environment construction (in the latest version).

Now, you could update the environment building through:

conda create --name photomaker python=3.10
pip install -U pip

# Install requirements
pip install -r requirements.txt

# Install photomaker
pip install git+https://github.com/TencentARC/PhotoMaker.git

Then you can run the following command to use our PhotoMaker:

from photomaker import PhotoMakerStableDiffusionXLPipeline

The previous line can also be used outside the repo.