@decorator.decorator
def convert_masks_to_RGB(f, clip, *a, **k):
 if clip.ismask:
  clip = clip.to_RGB()
 return f(clip, *a, **k)

@ decorator . decorator def convert_masks_to_RGB ( f , clip , * a , ** k ) : if clip . ismask : clip = clip . to_RGB ( ) return f ( clip , * a , ** k )
if the clip is a mask .