Open YohoYang opened 2 years ago
Maybe the path of model can't contain Chinese. Because in code std::ifstream
is used to check if model exists. std::ifstream
is not friendly to Chinese. (But I haven't tested it so far.)
To be honest, the cache mechanism depends on ncnn frame. Generally, VapourSynth plugins use the function filterFree()
to free memory. Especially, in this plugin, we call ncnn::destroy_gpu_instance()
in filterFree()
to end ncnn and free cache.
Showing progress is a good idea. But I need to learn ncnn to figure out how to do it.
About the cache question, before, I am worried that there will be a lot of cache files in the system disk, but it seems to use memory to write, then there is no problem.
About the progress, thanks for your hard work.
As for the problem of Chinese paths, I tried to search the Internet for errors in reading Chinese paths with std::ifstream. There are many articles discussing this, and some solutions are also given, as follows, hope that helps, I can help with testing: Use the _TEXT() macro to specify string constants as TCHAR* types
file.open(_TEXT("c://测试//测试文本.txt"));
Another method is to set the locale to the value of the user system first, and then restore it after using ifstream
locale::global(locale(""));
//open file
locale::global(locale("C"));
Finally, thank you again for your hard work again.
VapourSynth-RealSR-ncnn-Vulkan is great.
Hope to show progress as it is processed.
One problem is that if the path contains Chinese, the following error will be prompted, maybe the path does not support UTF-8?
By the way, are there caches generated during processing, and where are they all stored?