holywu / vs-gmfss_union Goto Github PK
View Code? Open in Web Editor NEWGMFSS_union function for VapourSynth
License: MIT License
GMFSS_union function for VapourSynth
License: MIT License
vs-gmfss_union/vsgmfss_union/gmfss.py
Line 52 in c809920
Reuse
part is designed to calculate optical flow and features which can be reused when fusing/inferencing frames at different/arbitrary timestep.GMFSS
class should be split into two part for sake of TRT to avoid redundant inference (if necessary/convenient), whose pseudocode probably looks like:
class Reuse(nn.Module):
...
def forward(img0, img1):
...
return reuse_things
class GMFSS(nn.Module):
...
def forward(img0, img1, reuse_things, timestep):
...
return self.fusionnet(img0, img1, reuse_things, merged, timestep)
inst_reuse = Reuse(...)
inst_gmfss = GMFSS(...)
def inference(n: int, f: list[vs.VideoFrame]) -> vs.VideoFrame:
...
reuse_things = inst_reuse(img0, img1) # this takes up 30% of the time according to our inspection
timesteps = [timestep...]
for t in timesteps: # I don't know how to implement the sequential logic in VS(probably using packet or async? no idea, so filled with a for loop here
output = inst_gmfss(img0, img1, reuse_things, timestep) # the left 70% calculation ends up here
...
With other torch filters, I can usually place all cuda&co filter into a single folder and I can add that folder with:
# Adding torch dependencies to PATH
path = site.getsitepackages()[0]+'/torch_dependencies/'
ctypes.windll.kernel32.SetDllDirectoryW(path)
path = path.replace('\\', '/')
os.environ["PATH"] = path + os.pathsep + os.environ["PATH"]
First I thought, it would be enough, if I additionally set os.environ["CUDA_PATH"] = path
.
But then I get:
[code]Python exception: [WinError 2] Das System kann die angegebene Datei nicht finden: 'I:/Hybrid/64bit/Vapoursynth/torch_dependencies/bin'[/code]
If I copy all my dlls into a bin-subfolder of torch_dependencies it works.
Would be nice if vs-gmfss_union would also directly use in the CUDA_PATH and not require a bin-subfolder, or if one could specify the folder where the filter should look manually.
Hi there, sorry for posting here but I don't know where else to push port requests...
"FMNet: Frequency-Aware Modulation Network for SDR-to-HDR Translation" looks interesting, it would be nice to have a VapourSynth port:
git: https://github.com/MCG-NKU/FMNet
Thanks in advance and hope that inspires !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.