{
 "last_node_id": 9,
 "last_link_id": 7,
 "nodes": [
  {
   "id": 1,
   "type": "MarkdownNote",
   "pos": [
    0,
    -438.0
   ],
   "size": [
    640,
    268
   ],
   "flags": {},
   "order": 1,
   "mode": 0,
   "inputs": [],
   "outputs": [],
   "properties": {},
   "widgets_values": [
    "**Needs in ComfyUI's `input` folder:** `example.png`\n\nRelight a photo (example.png; use a portrait): the surface normals decide how a new light falls on it, no diffusion step. Top: Normals shows the colour-coded directions the surfaces face. Relight photo estimates the same kind of normals itself (its third output) and shades them with Lambert's law: one light from the left, one from the right (light_x). Strength, ambient and soft change how hard the new light is; cast shadows and the old light's shadows are not handled. No speed claim is made here."
   ]
  },
  {
   "id": 2,
   "type": "LoadImage",
   "pos": [
    0.0,
    0.0
   ],
   "size": [
    300,
    340
   ],
   "flags": {},
   "order": 2,
   "mode": 0,
   "inputs": [],
   "outputs": [
    {
     "name": "IMAGE",
     "type": "IMAGE",
     "links": [
      1,
      3,
      6
     ],
     "slot_index": 0
    },
    {
     "name": "MASK",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    }
   ],
   "properties": {},
   "widgets_values": [
    "example.png",
    "image"
   ]
  },
  {
   "id": 3,
   "type": "FastforksNormals",
   "pos": [
    540.0,
    0.0
   ],
   "size": [
    330,
    230
   ],
   "flags": {},
   "order": 3,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 1
    }
   ],
   "outputs": [
    {
     "name": "normals",
     "type": "IMAGE",
     "links": [
      2
     ],
     "slot_index": 0
    }
   ],
   "properties": {},
   "title": "normals (fastforks)",
   "widgets_values": [
    "stablenormal-turbo",
    "auto",
    "auto",
    1
   ]
  },
  {
   "id": 4,
   "type": "PreviewImage",
   "pos": [
    950.0,
    0.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 4,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 2
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 5,
   "type": "FastforksRelight",
   "pos": [
    540.0,
    400.0
   ],
   "size": [
    330,
    380
   ],
   "flags": {},
   "order": 5,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 3
    }
   ],
   "outputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "links": [
      4
     ],
     "slot_index": 0
    },
    {
     "name": "shading",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    },
    {
     "name": "normals",
     "type": "IMAGE",
     "links": [
      5
     ],
     "slot_index": 2
    }
   ],
   "properties": {},
   "title": "relight, light_x -1",
   "widgets_values": [
    "moge-2-vitb-normal",
    "auto",
    "auto",
    -1.0,
    -1.0,
    -1.0,
    0.8,
    0.3,
    0.0,
    "1, 1, 1"
   ]
  },
  {
   "id": 6,
   "type": "PreviewImage",
   "pos": [
    950.0,
    400.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 6,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 4
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 7,
   "type": "PreviewImage",
   "pos": [
    950.0,
    740.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 7,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 5
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  },
  {
   "id": 8,
   "type": "FastforksRelight",
   "pos": [
    540.0,
    820.0
   ],
   "size": [
    330,
    380
   ],
   "flags": {},
   "order": 8,
   "mode": 0,
   "inputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "link": 6
    }
   ],
   "outputs": [
    {
     "name": "image",
     "type": "IMAGE",
     "links": [
      7
     ],
     "slot_index": 0
    },
    {
     "name": "shading",
     "type": "MASK",
     "links": [],
     "slot_index": 1
    },
    {
     "name": "normals",
     "type": "IMAGE",
     "links": [],
     "slot_index": 2
    }
   ],
   "properties": {},
   "title": "relight, light_x 1",
   "widgets_values": [
    "moge-2-vitb-normal",
    "auto",
    "auto",
    1.0,
    -1.0,
    -1.0,
    0.8,
    0.3,
    0.0,
    "1, 1, 1"
   ]
  },
  {
   "id": 9,
   "type": "PreviewImage",
   "pos": [
    950.0,
    1080.0
   ],
   "size": [
    300,
    300
   ],
   "flags": {},
   "order": 9,
   "mode": 0,
   "inputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "link": 7
    }
   ],
   "outputs": [
    {
     "name": "images",
     "type": "IMAGE",
     "links": [],
     "slot_index": 0
    }
   ],
   "properties": {},
   "widgets_values": []
  }
 ],
 "links": [
  [
   1,
   2,
   0,
   3,
   0,
   "IMAGE"
  ],
  [
   2,
   3,
   0,
   4,
   0,
   "IMAGE"
  ],
  [
   3,
   2,
   0,
   5,
   0,
   "IMAGE"
  ],
  [
   4,
   5,
   0,
   6,
   0,
   "IMAGE"
  ],
  [
   5,
   5,
   2,
   7,
   0,
   "IMAGE"
  ],
  [
   6,
   2,
   0,
   8,
   0,
   "IMAGE"
  ],
  [
   7,
   8,
   0,
   9,
   0,
   "IMAGE"
  ]
 ],
 "groups": [
  {
   "id": 1,
   "title": "Inputs",
   "bounding": [
    -30.0,
    -90.0,
    360.0,
    460.0
   ],
   "color": "#88A",
   "font_size": 24,
   "flags": {}
  },
  {
   "id": 2,
   "title": "fastforks",
   "bounding": [
    510.0,
    -90.0,
    770.0,
    1500.0
   ],
   "color": "#3f789e",
   "font_size": 24,
   "flags": {}
  }
 ],
 "config": {},
 "extra": {},
 "version": 0.4
}