After the training of stage 1, model.safetensors and optimizer.bin and random_states have been saved.However,I don't get the ip.bin and style_aware_bin.So I use the following codes for saving necessary ckpt but I don't get style in the inference result which is terrible. I'm confused about how to save the correct training ckpt .
if accelerator.is_main_process:
torch.save(accelerator.unwrap_model(ip_adapter).state_dict(),
os.path.join(save_path, "ip.bin"))
torch.save(accelerator.unwrap_model(style_aware_encoder).state_dict(),
os.path.join(save_path, "style_aware_encoder.bin"))
After the training of stage 1, model.safetensors and optimizer.bin and random_states have been saved.However,I don't get the ip.bin and style_aware_bin.So I use the following codes for saving necessary ckpt but I don't get style in the inference result which is terrible. I'm confused about how to save the correct training ckpt .
if accelerator.is_main_process:
torch.save(accelerator.unwrap_model(ip_adapter).state_dict(),
os.path.join(save_path, "ip.bin"))
torch.save(accelerator.unwrap_model(style_aware_encoder).state_dict(),
os.path.join(save_path, "style_aware_encoder.bin"))