Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLVFX option to set model_path? #18

Closed
Selur opened this issue Nov 20, 2022 · 4 comments
Closed

DLVFX option to set model_path? #18

Selur opened this issue Nov 20, 2022 · 4 comments

Comments

@Selur
Copy link

Selur commented Nov 20, 2022

Hi, I'm trying to get akatin.DLVFX working in a portable Vapoursynth/Python setup, using:

# load akarin plugin
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/Akarin/akarin.dll")

# add akarin-folder to PATH (folder includes akarin.dll and all dlls and models from nvidia_video_effects_sdk_installer_ada)
path = 'i:/Hybrid/64bit/vsfilters/Support/Akarin'
os.environ["PATH"] += os.pathsep + path

# set MODEL_DIR for akarin (seemingly without effect)
path = 'i:/Hybrid/64bit/vsfilters/Support/Akarin/models'
os.environ["MODEL_DIR"] = path

clip = core.akarin.DLVFX(clip, op=0, strength=0.5)

full script used: https://pastebin.com/cW3Bg4BV

But end up :

MODEL_DIR = C:\Program Files\NVIDIA Corporation\NVIDIA Video Effects\models
Cannot load model "AR-con-89.engine"
ERROR: Loading TRTModel failed in Artifact Removal
failed VFX call NvVFX_Load(d->vfx): fffffff3 (The file could not be found)

So seems like the MODEL_DIR is not taken from the environment, but from somewhere else.

=> Would it be possible to add another parameter to DLVFX to overwrite the 'MODEL_DIR'-variable or do you know another way to get this working?

@AkarinVS
Copy link
Owner

MODEL_DIR is taken from environment variable MODEL_DIR.

const char *modelDir = getenv("MODEL_DIR"); // TODO: configurable model directory?

And assignment to os.environ should set the environment variable, so I'm not sure what's going on.

@AkarinVS
Copy link
Owner

Please try this build https://github.com/AkarinVS/vapoursynth-plugin/releases/download/v0.96/akarin-release-lexpr-amd64-v0.96.7z that introduces a model_dir parameter to DLVFX.

(That build also includes other enhancements, but those are not yet ready for production. Better to ignore them.)

@Selur
Copy link
Author

Selur commented Nov 21, 2022

Just ,tested:

path = 'i:/Hybrid/64bit/vsfilters/Support/Akarin/models'



clip = core.akarin.DLVFX(clip, op=0, strength=0.5,model_dir=path)

and it works. :)
Thanks. :)

@AkarinVS
Copy link
Owner

Thanks for confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants