open-mmlab / StyleShot

StyleShot: A SnapShot on Any Style. 一款可以迁移任意风格到任意内容的模型,无需针对图片微调,即能生成高质量的个性风格化图片!
https://styleshot.github.io/
MIT License
229 stars 14 forks source link

About training problem with stage 2 #19

Closed nldhuyen0047 closed 1 month ago

nldhuyen0047 commented 1 month ago

Hi, I finished training model with stage 1, but with stage 2, I see the content_image_file in load_data function, my json file does not have this variable. So the content_prompt with the content_image_file are similar? Should I need to add this variable in my json file before training in stage 2?

Thank you so much, I look forward to hearing from you soon.

Jeoyal commented 1 month ago

content_image_file is the content input image that has been processed by contouring. Please follow our tutorial to prepare it (preferably resized to 512x512) and add this variable in json file.

nldhuyen0047 commented 1 month ago

Thank you so muchhh.

Jeoyal commented 1 month ago

:)

nldhuyen0047 commented 1 month ago

Hi, T_T I have a question that, I do not know how to inference the code after training with the new checkpoint, could you please explain to me?

Thank you so much.

Jeoyal commented 1 month ago

Please change ip_ckpt and style_aware_encoder_path in each inference script into your checkpoints.

It might follow this path structure: output/checkpoint-xxxxx/pytorch_model.bin (ip_ckpt) output/checkpoint-xxxxx/pytorch_model_1.bin (style_aware_encoder_path)

nldhuyen0047 commented 1 month ago

I could run.

Thank you so much.

Jeoyal commented 1 month ago

Hope you achieve the results you desire. :)

nldhuyen0047 commented 1 month ago

Yeah, thank you so much. I hope so ^^.