claudiom4sir/StableVSR

How to load my own trained weights to run tests?

Closed this issue · 4 comments

Hello, I successfully ran the training code and generated the model weights as follows,
image
My confusion is that when I execute the test: python test.py --in_path YOUR_PATH_TO_LR_SEQS --out_path YOUR_OUTPUT_PATH --num_inference_steps 50, how do I load my own completed trained model? How should I specify in the test code and which files to specify to complete the test?
image

Hi,

you can add the following lines:

from diffusers import ControlNetModel
controlnet_model = ControlNetModel.from_pretrained(your_path_to_ckpt/checkpoint-20000, subfolder='controlnet')

and replace

pipeline = StableVSRPipeline.from_pretrained(model_id)

with

pipeline = StableVSRPipeline.from_pretrained(model_id, controlnet=controlnet_model)

I forgot to add this option in the test script. I have just updated the code to support this operation.

你好,

您可以添加以下几行:

from diffusers import ControlNetModel
controlnet_model = ControlNetModel.from_pretrained(your_path_to_ckpt/checkpoint-20000, subfolder='controlnet')

并替换

pipeline = StableVSRPipeline.from_pretrained(model_id)

pipeline = StableVSRPipeline.from_pretrained(model_id, controlnet=controlnet_model)

我忘记在测试脚本中添加此选项。我刚刚更新了代码以支持此操作。

I understand, thank you very much!

Hello, I have successfully tested the model based on your modified code, but found that, the test results do not contain the evaluation metrics, can you please provide the calculation metrics in the code? Looking forward to your reply.
image
@claudiom4sir

Refer to issue #12