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

Reloading script always increases memory consumption #195

Open
Ichunjo opened this issue Sep 24, 2024 · 5 comments
Open

Reloading script always increases memory consumption #195

Ichunjo opened this issue Sep 24, 2024 · 5 comments

Comments

@Ichunjo
Copy link
Contributor

Ichunjo commented Sep 24, 2024

The tests I did so far:

  • Looking at memory used after each reloading on Task Manager
  • Printing the length of gc.get_objects() after each reloading

it's getting worse as script complexity increases and a large number of outputs are previewed.

@Setsugennoao
Copy link
Member

it most likely isn't related to vspreview but rather a package you're using is holding a hard reference to the core and it's not getting destroyed, if you provide a sample script i can check

@Ichunjo
Copy link
Contributor Author

Ichunjo commented Sep 27, 2024

import gc
from vapoursynth import core

clip = core.bs.VideoSource(r"")
print(len(gc.get_objects()))
clip.set_output()

@Setsugennoao
Copy link
Member

what plugins have you got?

@Ichunjo
Copy link
Contributor Author

Ichunjo commented Sep 28, 2024

adg               |  moe.kageru.adaptivegrain                |  Adaptive grain
akarin            |  info.akarin.vsplugin                    |  Akarin's Experimental Filters
average           |  eoe-nephren.average                     |  vs-average
avs               |  com.vapoursynth.avisynth                |  VapourSynth Avisynth Compatibility
bas               |  com.vapoursynth.bestaudiosource         |  Best Audio Source
bilateral         |  mawen1250.Bilateral                     |  Bilateral filter and Gaussian filter for VapourSynth.
bilateralgpu      |  com.wolframrhodium.bilateralgpu         |  Bilateral filter using CUDA
bilateralgpu_rtc  |  com.wolframrhodium.bilateralgpu_rtc     |  Bilateral filter using CUDA (NVRTC)
bm3d              |  com.vapoursynth.bm3d                    |  Implementation of BM3D denoising filter for VapourSynth.
bm3dcpu           |  com.wolframrhodium.bm3dcpu              |  BM3D algorithm implemented in AVX and AVX2 intrinsics
bm3dcuda          |  com.wolframrhodium.bm3dcuda             |  BM3D algorithm implemented in CUDA
bm3dcuda_rtc      |  com.wolframrhodium.bm3dcuda_rtc         |  BM3D algorithm implemented in CUDA (NVRTC)
bore              |  ng.opusga.bore                          |  bore plugin
bs                |  com.vapoursynth.bestsource              |  Best Source 2
cas               |  com.holywu.cas                          |  Contrast Adaptive Sharpening
cs                |  moe.grass.carefulsource                 |  carefulsource
descale           |  tegaf.asi.xe                            |  Undo linear interpolation
dfttest           |  com.holywu.dfttest                      |  2D/3D frequency domain denoiser
dgdecodenv        |  com.vapoursynth.dgdecodenv              |  DGDecodeNV for VapourSynth
dmetrics          |  com.vapoursynth.dmetrics                |  Decomb Metrics
dpid              |  com.wolframrhodium.dpid                 |  Rapid, Detail-Preserving Image Downscaling
edgefixer         |  the.weather.channel                     |  ultraman
eedi3             |  com.vapoursynth.eedi3                   |  EEDI3
eedi3m            |  com.holywu.eedi3                        |  Enhanced Edge Directed Interpolation 3
fb                |  com.nodame.fillborders                  |  FillBorders plugin for VapourSynth
ffms2             |  com.vapoursynth.ffms2                   |  FFmpegSource 2 for VapourSynth
fh                |  com.nodame.fieldhint                    |  FieldHint Plugin
fmtc              |  fmtconv                                 |  Format converter
grain             |  com.holywu.addgrain                     |  Random noise film grain generator
hist              |  com.nodame.histogram                    |  VapourSynth Histogram Plugin
imwri             |  com.vapoursynth.imwri                   |  VapourSynth ImageMagick 7 HDRI Writer/Reader
knlm              |  com.Khanattila.KNLMeansCL               |  KNLMeansCL for VapourSynth
libp2p            |  com.djatom.libp2p                       |  libp2p rgb formats packer/unpacker
lsmas             |  systems.innocent.lsmas                  |  LSMASHSource for VapourSynth
misc              |  com.vapoursynth.misc                    |  Miscellaneous filters
mv                |  com.nodame.mvtools                      |  MVTools v23
mvsf              |  com.nodame.mvsf                         |  MVTools Single Precision
ncnn              |  io.github.amusementclub.vs_ncnn         |  NCNN ML Filter Runtime
neo_dfttest       |  in.7086.neo_dfttest                     |  Neo DFTTest Deband Filter r8 - 2D/3D frequency domain denoiser
neo_f3kdb         |  in.7086.neo_f3kdb                       |  Neo F3KDB Deband Filter r9
neo_fft3d         |  in.7086.neo_fft3d                       |  Neo FFT3D Filter r11
nlm_cuda          |  io.github.amusementclub.nlm_cuda        |  Non-local means denoise filter implemented in CUDA
nnedi3            |  com.deinterlace.nnedi3                  |  Neural network edge directed interpolation (3rd gen.), v12
nnedi3cl          |  com.holywu.nnedi3cl                     |  An intra-field only deinterlacer
noise             |  moe.grass.addnoise                      |  Noise generator
ocr               |  biz.srsfckn.ocr                         |  Tesseract OCR Filter
ort               |  io.github.amusementclub.vs_onnxruntime  |  ONNX Runtime ML Filter Runtime
ov                |  io.github.amusementclub.vs_openvino     |  OpenVINO ML Filter Runtime
placebo           |  com.vs.placebo                          |  libplacebo plugin for VapourSynth
remap             |  blaze.plugin.remap                      |  Remaps frame indices based on a file/string
resize            |  com.vapoursynth.resize                  |  VapourSynth Resize
resize2           |  dev.setsugen.resize2                    |  Built-in VapourSynth resizer based on zimg with some modifications.
retinex           |  com.vapoursynth.retinex                 |  Implementation of Retinex algorithm for VapourSynth.
rgsf              |  com.vapoursynth.removegrainsf           |  RemoveGrain Single Precision
rgvs              |  com.vapoursynth.removegrainvs           |  RemoveGrain VapourSynth Port
sangnom           |  com.mio.sangnom                         |  VapourSynth Single Field Deinterlacer
scxvid            |  com.nodame.scxvid                       |  VapourSynth Scxvid Plugin
std               |  com.vapoursynth.std                     |  VapourSynth Core Functions
tcanny            |  com.holywu.tcanny                       |  Build an edge map using canny edge detection
tdm               |  com.holywu.tdeintmod                    |  A bi-directionally motion adaptive deinterlacer
text              |  com.vapoursynth.text                    |  VapourSynth Text
trt               |  io.github.amusementclub.vs_tensorrt     |  TensorRT ML Filter Runtime
ttmpsm            |  com.holywu.ttempsmooth                  |  A basic, motion adaptive, temporal smoothing filter
vivtc             |  org.ivtc.v                              |  VFM
w2xnvk            |  net.nlzy.vsw2xnvk                       |  VapourSynth Waifu2x NCNN Vulkan Plugin
warp              |  com.nodame.awarpsharp2                  |  Sharpen images by warping
wnnm              |  com.wolframrhodium.wnnm                 |  Weighted Nuclear Norm Minimization Denoiser
wwxd              |  com.nodame.wwxd                         |  Scene change detection approximately like Xvid's
znedi3            |  xxx.abc.znedi3                          |  Neural network edge directed interpolation (3rd gen.)

@Ichunjo
Copy link
Contributor Author

Ichunjo commented Sep 28, 2024

Or maybe you mean vspreview plugins? If yes, I have dft-view, native-res and the stock plugins. I tried to remove dft and native res but memory still increases after each reload.

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