Comments (14)
In order to solve the issue some users have suggested using WSL on Windows to set up a Unix-based environment.
@yvrjsharma yeah that's what I did, worked for me
On Windows, simply copy/paste \PhotoMaker\gradio_demo folder contents to \PhotoMaker
Now it should be possible to run python app.py as normal.
from photomaker.
@anderslogg @wandrzej I recreated a PhotoMaker environment and pulled PhotoMaker again. The result is displayed as follows.
The library is linux only, this won't work on windows
also can you add the following to the requirements.txt file
diffusers spaces transformers accelerate
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
from photomaker.
It seems there's no proper Python setup (setup.py or pyproject.toml). Try doing this in the top-level directory:
export PYTHONPATH=`pwd`:$PYTHONPATH
That took care of the above problem for me. Still no success running it :-( The demo gradio_demo/app.py
just hangs. I get the web page served and can upload a photo but then nothing happens.
from photomaker.
@anderslogg @wandrzej I recreated a PhotoMaker environment and pulled PhotoMaker again. The result is displayed as follows.
The library is linux only, this won't work on windows
also can you add the following to the requirements.txt file
diffusers
spaces
transformers
accelerate
from photomaker.
In order to solve the issue some users have suggested using WSL on Windows to set up a Unix-based environment.
@yvrjsharma yeah that's what I did, worked for me
from photomaker.
Hi. I am able to run the gradio_demo/app.py file by following the suggested steps from the project readme. I am currently running this on a Colab-pro using the provided CLI, as I do not have access to a local GPU at the moment. Initially, I was also encountering the error you reported in your post on the top. However, it was resolved for me after adding the following code lines on top of the app.py script:
# Add at the very top of app.py import sys sys.path.append('/content/PhotoMaker')This helps the script to set up its own search path correctly when it runs as a script (in the Colab env.) This modification actually helps the runtime environment of the script to include the directory where photomaker is located and thus it is able to locate the file
photomaker/pipeline
.
My best guess is that this is a Windows environment-related error that you are encountering over here. The error shown in the screenshot isValueError: cannot find context for 'fork'
, which is typically related to the multiprocessing features in Python, as per this issue on the transformers repo.
In order to solve the issue some users have suggested usingWSL
on Windows to set up a Unix-based environment. Alternatively, one can replacefork
withspawn
as the start method for multiprocessing on Windows. However, I am not entirely sure how to do this myself.
Hope this information is helpful to you.Thank you for providing me with inspiration. The problem arises from the incorrect module name. Change from photomaker.pipeline in app.py to from pipeline Change from photomaker.model in pipeline.py to from model Can continue, but another error occurs
I have also encountered the same problem. I hope you can find a solution.
from photomaker.
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.
from photomaker.
It seems there's no proper Python setup (setup.py or pyproject.toml). Try doing this in the top-level directory:
export PYTHONPATH=`pwd`:$PYTHONPATH
That took care of the above problem for me. Still no success running it :-( The demo
gradio_demo/app.py
just hangs. I get the web page served and can upload a photo but then nothing happens.
would probably help to add in the last line, in demo.launch()
debug=True parameter and checking what's going on.
from photomaker.
@anderslogg @wandrzej
I recreated a PhotoMaker environment and pulled PhotoMaker again. The result is displayed as follows.
from photomaker.
Hi. I am able to run the gradio_demo/app.py file by following the suggested steps from the project readme. I am currently running this on a Colab-pro using the provided CLI, as I do not have access to a local GPU at the moment. Initially, I was also encountering the error you reported in your post on the top. However, it was resolved for me after adding the following code lines on top of the app.py script:
# Add at the very top of app.py
import sys
sys.path.append('/content/PhotoMaker')
This helps the script to set up its own search path correctly when it runs as a script (in the Colab env.)
This modification actually helps the runtime environment of the script to include the directory where photomaker is located and thus it is able to locate the file photomaker/pipeline
.
My best guess is that this is a Windows environment-related error that you are encountering over here. The error shown in the screenshot is ValueError: cannot find context for 'fork'
, which is typically related to the multiprocessing features in Python, as per this issue on the transformers repo.
In order to solve the issue some users have suggested using WSL
on Windows to set up a Unix-based environment. Alternatively, one can replace fork
with spawn
as the start method for multiprocessing on Windows. However, I am not entirely sure how to do this myself.
Hope this information is helpful to you.
from photomaker.
Hi. I am able to run the gradio_demo/app.py file by following the suggested steps from the project readme. I am currently running this on a Colab-pro using the provided CLI, as I do not have access to a local GPU at the moment. Initially, I was also encountering the error you reported in your post on the top. However, it was resolved for me after adding the following code lines on top of the app.py script:
# Add at the very top of app.py import sys sys.path.append('/content/PhotoMaker')This helps the script to set up its own search path correctly when it runs as a script (in the Colab env.) This modification actually helps the runtime environment of the script to include the directory where photomaker is located and thus it is able to locate the file
photomaker/pipeline
.My best guess is that this is a Windows environment-related error that you are encountering over here. The error shown in the screenshot is
ValueError: cannot find context for 'fork'
, which is typically related to the multiprocessing features in Python, as per this issue on the transformers repo.In order to solve the issue some users have suggested using
WSL
on Windows to set up a Unix-based environment. Alternatively, one can replacefork
withspawn
as the start method for multiprocessing on Windows. However, I am not entirely sure how to do this myself.Hope this information is helpful to you.
Thank you for providing me with inspiration. The problem arises from the incorrect module name.
Change from photomaker.pipeline in app.py to from pipeline
Change from photomaker.model in pipeline.py to from model
Can continue, but another error occurs
from photomaker.
On Windows, simply copy/paste \PhotoMaker\gradio_demo folder contents to \PhotoMaker
Now it should be possible to run python app.py as normal.
Same for mac or anyone facing same. Simplest fix
from photomaker.
Can try simply importing the typing module and see how it goes? @Crazy-CYZ
import typing
Can continue, but another error occurs
from photomaker.
what i do is that
1、copy gradio_demo/* to photomaker/*
2、change "from photomaker.xxxx import xxx" to "from xxxx imoprt xxxx"
the ok
from photomaker.
Related Issues (20)
- How add another Loras model? HOT 3
- An error occurred while running the app.py file HOT 2
- 普通人照片放上去不太像 HOT 4
- `class_word` in prompt
- Is there any plan to release the training code?
- 试了一下,感觉自己对比照片变丑了好多 HOT 1
- 输入一张图片中包含多个人脸时,如何处理?
- Progress stuck 0.0%
- PhotoMaker Style difference
- Any way to change the output path of the demo and not have all images disappear? HOT 1
- Support for ControlNet? HOT 1
- Gradio app.py examples
- Can the class word automatically detect during inference stage?
- Weighted prompt on photomaker
- What’s the weight license?
- httpx.RemoteProtocolError: Server disconnected without sending a response
- Can photomaker be used with SD XL Lightning?
- Why is it running slowly on an L4 GPU?
- Where to initialize self.id_image_processor?
- About the batch inference
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from photomaker.