TencentARC / PhotoMaker

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

v2 kills Windows support #161

Open SoftologyPro opened 4 months ago

SoftologyPro commented 4 months ago

When I start the gradio app I get this...

    from multiprocessing.context import ForkProcess
ImportError: cannot import name 'ForkProcess' from 'multiprocessing.context' (D:\Python\lib\multiprocessing\context.py)

ForkProcess is only on Unix? Any chance you can patch it for Windows compatibility too? v1 of PhotoMaker worked fine under Windows. Apparently Windows needs to use SpawnProcess rather than ForkProcess. Can you add an if to detect the OS and call the relevant code?

RichardGoldbergSchool commented 4 months ago

If you edit wrappers.py to change import ForkProcess to import SpawnProcess it fixes that particular error. There are a couple more edits you're going to need to do in order to get things running. Will update this post once I'm at my PC. Currently I'm able to get the app to run, but when I actually try and generate an image things break. Will report back if I get fixed today.

SoftologyPro commented 4 months ago

Thanks. I already support v1 in Visions of Chaos for any Windows users so having support for v2 and the upcoming v3 would be great. I could always auto edit the scripts once installed to be Windows compatible (if I knew all the edits), but it would be better/easier if the source repo code supported Windows without needing any edits at my end. That way the install for Visions of Chaos users is a single button click.