-
Notifications
You must be signed in to change notification settings - Fork 769
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
Problem running Gradio demo #22
Comments
This seems to be an issue with Also needed to drag the |
I've done the fork -> spawn thing, but that still gives me an error
Will try moving the folder... |
Also changed the line of code from 'fork' to 'spawn' but I still get a similar ModuleNotFoundError |
I had to install photomaker by |
I had to put all files from photomaker folder into the root where app.py is located @, removing the subfolder photomaker completly and adjusting the app.py as well as the pipeline.py to not look inside photomaker. folder for the modules so it looks like:
I also had to change: line 22 in pipeline.py and EDIT: the issure with not finding the req files/modules in the subfolder might be caused by a missing init.py file inside that folder (can be an empty file) |
This won't work cuz it's another library you're installing, which is used to make funny pictures https://pypi.org/project/photomaker/ I just tried the following:
Edit: installing the models did not fix the ModuleNotFoundError: No Module named 'photomaker' |
try my solution -with all files into the gradient_demo folder, and adjusting the two .py files to not look into the photomaker studio as described above. it works for me until now - gotta wait for the download to finish |
Let us know if you get reasonable outputs. I followed the approach above and got Gradio running, but my outputs are a blobby brown noise. |
This worked! Thank you so much! |
Allmost worked...
|
yes, bad entry in readme - shoudl state required python 3.9 - this Tulpe error been the last error - now onto the stylized version :D |
Built Distributions photomaker-1.0.1-1-py3-none-any.whl (3.1 MB view hashes) |
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. |
@dancemanUK |
Guys, you don’t need to be tricky, just put the file in the root and that’s it, change the extension to .py |
and put the style file in the root too |
running on sagemaker i've got this
|
I've cloned PhotoMaker and installed a venv of Python 3.8.
All requirements has installed ok with help of an earlier version of pytorch since I got this first:
(venv) Q:\PhotoMaker>pip install -r requirements.txt
Collecting torch==2.0.1
Downloading torch-2.0.1-cp38-cp38-win_amd64.whl (172.4 MB)
|████████████████████████████████| 172.4 MB 6.4 MB/s
Collecting torchvision==0.15.2
Downloading torchvision-0.15.2-cp38-cp38-win_amd64.whl (1.2 MB)
|████████████████████████████████| 1.2 MB 6.4 MB/s
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
Using older version of torch at least the installation worked:
pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu118
Now I have this error trying to run the Gradio demo though:
(venv) Q:\PhotoMaker>python gradio_demo/app.py
Traceback (most recent call last):
File "gradio_demo/app.py", line 10, in
import spaces
File "Q:\PhotoMaker\venv\lib\site-packages\spaces_init_.py", line 10, in
from .zero.decorator import GPU
File "Q:\PhotoMaker\venv\lib\site-packages\spaces\zero\decorator.py", line 18, in
from .wrappers import regular_function_wrapper
File "Q:\PhotoMaker\venv\lib\site-packages\spaces\zero\wrappers.py", line 42, in
Process = multiprocessing.get_context('fork').Process
File "C:\Users\Kallamamran\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 239, in get_context
return super().get_context(method)
File "C:\Users\Kallamamran\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 193, in get_context
raise ValueError('cannot find context for %r' % method) from None
ValueError: cannot find context for 'fork'
I wonder what's wrong :(
The text was updated successfully, but these errors were encountered: