Custom compositor node - connecting input to output

I am trying to make this simple node group that would simply connect the input to the output so it would simply repeat an image like below.

What is the problem with my code? It's like nothing is coming out from the output.

import bpy

class Repeat (bpy.types.NodeCustomGroup):

bl_name='Repeat'
bl_label='Repeat'

def init(self, context):
self.node_tree=bpy.data.node_groups.new(self.bl_name, 'CompositorNodeTree')
if hasattr(self.node_tree, 'is_hidden'):
self.node_tree.is_hidden=True

self.node_tree.inputs.new("NodeSocketColor", "Image")
self.node_tree.outputs.new("NodeSocketColor", "Image")
self.node_tree.nodes.new('NodeGroupInput')
self.node_tree.nodes.new('NodeGroupOutput')

#trying to connect input to output here, possible problem?

def free(self):

from nodeitems_utils import NodeItem, register_node_categories, unregister_node_categories
from nodeitems_builtins import CompositorNodeCategory

def register():
bpy.utils.register_class(Repeat)
newcatlist = [CompositorNodeCategory("CP_GENERATE", "Testing", items=[NodeItem("Repeat"),]),]
register_node_categories("GENERATE_NODES", newcatlist)

def unregister():
unregister_node_categories("GENERATE_NODES")
bpy.utils.unregister_class(Repeat)

try :
unregister()
except:
pass
register()

• The node stuff you are doing in register is from custom pynodes, use them only in their own custom node trees as they don't mix well with standard nodes. You want to create an operator that creates standard nodes in a group. The code in your init is close, but old - as in pre2.67, see this answer. – sambler Nov 5 '18 at 8:38
• @sambler Ah thanks for the link, I didn't know it's obsolete. – Hitokage Nov 6 '18 at 19:18
• @sambler OK seems like I managed to create a working node_tree but for some reason it's not working in the custom node but the same tree is working when assigned to a node group node. I however wanted to make the node customizable looking like standard nodes, not this ugly group :D. Any way how to do it? – Hitokage Nov 6 '18 at 21:15
• As I mentioned, custom nodes do not interact with existing nodes, as one of the blender devs answered PyNodes do not make it possible to extend Blender Internal, Cycles or the compositor with new nodes. At this stage a group node is the option you have, you just have to accept having the node group list in your node until a developer offers a better solution. – sambler Nov 7 '18 at 7:34
• Just to update the information in this thread: 2.80 now gives the hability to create custom nodegroups for Compositor! One just needs to derive #CompositorNodeCustomGroup#, and work the same as using the former #NodeCustomGroup#. – Secrop Mar 28 at 5:46