-
Notifications
You must be signed in to change notification settings - Fork 48
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
failing to compute hair_mask with CDGnet #13
Comments
I encountered the same issue, and was able to fix it by modifying the code as state_dict = model.state_dict().copy()
state_dict_old = torch.load(args.CDGNET_ckpt, map_location='cpu')
- for key, nkey in zip(state_dict_old.keys(), state_dict.keys()):
+ state_dict_keys = list(state_dict.keys())
+ for key, nkey in zip(state_dict_old.keys(), state_dict_keys):
if key != nkey:
# remove the 'module.' in the 'key'
state_dict[key[7:]] = deepcopy(state_dict_old[key]) and then downloading a different version of Hope this helps! |
Hi Kenshi, |
Can you provide me with a download link for LIP_epoch_149.pth? |
I am trying to pre-process custom data, by following your indications. For simplicity, i am using the monocular data provided by you in /monocular/person_0_image. I get an error when executing the command:
python preprocess_custom_data/calc_masks.py --scene_path ./implicit-hair-data/data/SCENE_TYPE/CASE/ --MODNET_ckpt path_to_modnet --CDGNET_ckpt path_to_cdgnet
calc_masks.py", line 159, in main
for key, nkey in zip(state_dict_old.keys(), state_dict.keys()):
RuntimeError: OrderedDict mutated during iteration
I tried to find a workaround by rewriting the lines from 156 to 164 like this (following the discussion here: https://github.com/pytorch/pytorch/issues/40859
and then the images are generated, but they are all black. So what am i missing?
By contrast, mask images via MODnet are generated succesfully.
The text was updated successfully, but these errors were encountered: