Open QuanchaoSong opened 3 years ago
I don't have mac, you can always use docker.
alright
@AlbusSong you should try this: https://stackoverflow.com/a/70219965/14864907
With the installation of an osx-64 environment and python 3.7 it works for me, I am under macOS-12.5.1-arm64-arm-64bit
M1 chip configuration.
conda create -n firstm
conda activate firstm
#use the channel(s) of the x86_64 architecture
conda config --env --set subdir osx-64
conda install python=3.7
git clone https://github.com/AliaksandrSiarohin/first-order-model.git
cd first-order-model/
pip install -r requirements.txt
pip uninstall pillow
pip install "pillow<7"
and after uploading the pre-trained checkpoint and your image and video source:
(firstm) user@Users-MacBook-Air first-order-model % python demo.py --config config/vox-256.yaml --checkpoint checkpoints/vox-cpk.pth.tar --source_image ./assets/source.png --driving_video ./assets/driving.mp4 --cpu
/Users/user/miniconda3/envs/firstm/lib/python3.7/site-packages/skimage/transform/_warps.py:105 : UserWarning : The default mode, 'constant', will be changed to 'reflect' in skimage 0.15.
warn("The default mode, 'constant', will be changed to 'reflect' in "
/Users/user/miniconda3/envs/firstm/lib/python3.7/site-packages/skimage/transform/_warps.py:110: UserWarning: Antialiasing will be enabled by default in skimage 0.15 to avoid aliasing artifacts when downsampling images.
warn("Antialiasing will be enabled by default in skimage 0.15 for "
demo.py:27: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is not safe. Please read https://msg.pyyaml.org/load for more details.
config = yaml.load(f)
0%| | 0/169 [00:00< ?, ?it/s]/Users/user/miniconda3/envs/firstm/lib/python3.7/site-packages/torch/nn/functional.py:2423 : UserWarning: The default oversampling behaviour when mode=bilinear is changed to align_corners=False since version 0.4.0. Please specify align_corners=True if you want to keep the old behaviour. See the nn.Upsample documentation for more details.
"See nn.Upsample documentation for details.".format(mode))
/Users/user/miniconda3/envs/firstm/lib/python3.7/site-packages/torch/nn/functional.py:1332 : UserWarning : nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
1%|▎ | 1/169 [00:04<11:23, 4.07s/it]
I had to revert python to 3.8 and also revert image io to 2.13 then I was able to build demo.py, libs aren't up to date for the repo.
I am using Python3.9.1, MacOS 11.1(Big Sur), pip 20.3.3. When I run
pip3 install -r requirements.txt
, it reports me a lot of errors related to lib dependency. Can you check it on your computer with these latest softwares?