MFaceTech / InstantID

Apache License 2.0
163 stars 32 forks source link

How to split saved params? #7

Closed Oguzhanercan closed 5 months ago

Oguzhanercan commented 5 months ago

Hi, after saving the params, it saves 20.1 GB bf_16_zero_pp_rank_0_mp_rank_00_optim_states.pt and 13.6 GB mp_rank_00_model_states.pt. How to get InstantID params from these? What it saves and how to split them?

goodlookingbear commented 3 months ago

@Oguzhanercan Hello, may I ask how I can preprocess the dataset? I know that additional_features can be generated using blip. Do you have any good methods or models for generating bbox, landmarks, and insightface_featureFILE? Thank you.

chenxinhua commented 3 months ago

Hi, after saving the params, it saves 20.1 GB bf_16_zero_pp_rank_0_mp_rank_00_optim_states.pt and 13.6 GB mp_rank_00_model_states.pt. How to get InstantID params from these? What it saves and how to split them?

The training code contains a save_model_hook, It only saves the parameters of ipadapter and controlnet. Parameters of other frozen models are not saved.

Oguzhanercan commented 3 months ago

@goodlookingbear you can create insightface features with ingsightface library, which uses arcface for face recognation network. Also you can detect faces and relative landmarks with insightface library which uses scrfd, but you can use face-detection library to use retinaface etc. (it has 3 options). Blip or new sota would work for generating texts.

goodlookingbear commented 3 months ago

@Oguzhanercan Thanks a lot!