I'm trying to use my script I usually use for things, this script always worked without fail but I get this error now:
Code:Failed to evaluate the script: Python exception: No attribute with the name grain exists. Did you mistype a plugin namespace? Traceback (most recent call last): File "src\cython\vapoursynth.pyx", line 2242, in vapoursynth.vpy_evaluateScript File "src\cython\vapoursynth.pyx", line 2243, in vapoursynth.vpy_evaluateScript File "C:/Users/bri/Documents/scripts/tst.vpy", line 25, in lineart_mask = kgf.retinex_edgemask(scaled, 1).std.Maximum().std.Binarize() File "C:\Users\bri\AppData\Roaming\Python\Python39\site-packages\kagefunc.py", line 128, in adaptive_grain grained = core.grain.Add(clip, var=strength, constant=static) File "src\cython\vapoursynth.pyx", line 1891, in vapoursynth._CoreProxy.__getattr__ File "src\cython\vapoursynth.pyx", line 1754, in vapoursynth.Core.__getattr__ AttributeError: No attribute with the name grain exists. Did you mistype a plugin namespace?
My script being this:
Code:import vapoursynth as vs import lvsfunc as lvf import kagefunc as kgf import vsTAAmbk as taa import fvsfunc as fvf import havsfunc as haf import functools import cooldegrain from vsutil import * from nnedi3_rpow2 import * core = vs.core src = lvf.src(r'E:\VideoWork\tst.mkv') src = src[20336:20373] src = fvf.Depth(src, 16) scaled = core.resize.Spline36(src, 854, 480, matrix_in_s="709", matrix_s="170m") aamask = kgf.retinex_edgemask(scaled).std.Binarize(12000).std.Inflate() aa = taa.TAAmbk(scaled, aatype='Nnedi3', mclip=aamask) dehalo = haf.HQDeringmod(aa, darkthr=0, sharp=0, mthr=50) dark_mask = kgf.adaptive_grain(scaled, show_mask=True, luma_scaling=12).std.Binarize() lineart_mask = kgf.retinex_edgemask(scaled, 1).std.Maximum().std.Binarize() deband_mask = core.std.Expr([dark_mask, lineart_mask], expr='x y -', format=vs.GRAY) deband_a = core.f3kdb.Deband(dehalo, range=13, y=28, cb=16, cr=16, grainy=12, grainc=0, output_depth=16) deband_b = core.f3kdb.Deband(dehalo, range=15, y=28, cb=32, cr=32, grainy=16, grainc=0, output_depth=16) deband = core.std.MaskedMerge(deband_a, deband_b, deband_mask) grain = kgf.adaptive_grain(deband, 0.2, luma_scaling=12) out = grain final = fvf.Depth(out, 10) final.set_output()
I initially updated to R57 a few days ago but I encountered an error saying this with the same script:
Code:Failed to evaluate the script: Python exception: module 'vapoursynth' has no attribute 'YCOCG' Traceback (most recent call last): File "src\cython\vapoursynth.pyx", line 2832, in vapoursynth._vpy_evaluate File "src\cython\vapoursynth.pyx", line 2833, in vapoursynth._vpy_evaluate File "C:/Users/bri/Documents/SciptsVS/maid.vpy", line 20, in aamask = kgf.retinex_edgemask(scaled).std.Binarize(12000).std.Inflate() File "C:\Users\bri\AppData\Roaming\Python\Python39\site-packages\kagefunc.py", line 222, in retinex_edgemask luma = get_y(src) File "C:\Users\bri\AppData\Roaming\Python\Python39\site-packages\vsutil\func.py", line 31, in _check return function(clip, *args, **kwargs) File "C:\Users\bri\AppData\Roaming\Python\Python39\site-packages\vsutil\clips.py", line 92, in get_y if clip.format.color_family not in (vs.YUV, vs.YCOCG, vs.GRAY): AttributeError: module 'vapoursynth' has no attribute 'YCOCG'
So I went to downgrade back to R54 but I now have the grain error. How would this be fixed? Any help is appreciated
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 8 of 8
			
		- 
	
- 
	-> seems like you are missing: https://github.com/HomeOfVapourSynthEvolution/VapourSynth-AddGrainNo attribute with the name grain exists. Did you mistype a plugin namespace?
 
 Yup, YCOCG and COMPAT got removed.AttributeError: module 'vapoursynth' has no attribute 'YCOCG'
 
 Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini
- 
	
- 
	navigate to vsutil.py and delete that vs.YCOCG with that comma in: 
 check if there is more of that in that script,Code:if clip.format.color_family not in (vs.YUV, vs.YCOCG, vs.GRAY): 
 also, not that is wrong, but:
 is dumping a lots of functions unmarked on a pile, because if having more modules loaded like that, you loose readability, you do not know what function is from what moduleCode:from vsutil import * from nnedi3_rpow2 import * 
- 
	kagefunc.py is using this function error, it says it is in this line: 
 so looking at that kagefunc.py script:Code:grained = core.grain.Add(clip, var=strength, constant=static) 
 those pages does not seam to have a link for downloads, but here: https://git.kageru.moe/kageru/adaptivegrain/releases , that might be his adaptive grainCode:def adaptive_grain(clip: vs.VideoNode, strength=0.25, static=True, luma_scaling=12, show_mask=False) -> vs.VideoNode: """ Generates grain based on frame and pixel brightness. Details can be found here: https://kageru.moe/blog/article/adaptivegrain Strength is the strength of the grain generated by AddGrain, static=True for static grain, luma_scaling manipulates the grain alpha curve. Higher values will generate less grain (especially in brighter scenes), while lower values will generate more grain, even in brighter scenes. """ mask = core.adg.Mask(clip.std.PlaneStats(), luma_scaling) grained = core.grain.Add(clip, var=strength, constant=static) if get_depth(clip) != 8: mask = fvf.Depth(mask, bits=get_depth(clip)) if show_mask: return mask return core.std.MaskedMerge(clip, grained, mask)
- 
	Thanks for the help, AL. I will give these a shot again tomorrow. I do actually have that adaptive grain plugin downloaded in my plugins64 folder though, so I don't think it's that unless that is the wrong place to put it but that's where it always was before when this script was working fine without issue until now 
- 
	In older version of Vapoursynth the grain filter did come bundled with Vapoursynth, with API4 and R55+ most of the bundled filters were removed so you have to download them seperately. 
 
 Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
- 
  Installing vapoursynthBy rrats in forum Newbie / General discussionsReplies: 3Last Post: 30th Sep 2021, 17:35
- 
  Vapoursynth - Help installing f3kdb plugin and Hysteria script on WindowsBy T0talN00b in forum Newbie / General discussionsReplies: 1Last Post: 26th Jun 2021, 05:03
- 
  x264 PRO Plugin for Adobe Premiere/Media Encoder stopped workingBy Sithtronic in forum Video ConversionReplies: 4Last Post: 2nd Sep 2020, 10:10
- 
  Vapoursynth errorBy plshelpvapoursynth in forum Newbie / General discussionsReplies: 9Last Post: 24th Aug 2020, 00:19
- 
  StaxRip 1.7.0.0 with Vapoursynth ?By locky in forum Video ConversionReplies: 6Last Post: 24th Jan 2018, 19:08


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			
 Quote
 Quote Visit Homepage
				Visit Homepage
			