sdxl_inpaint.json 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. {
  2. "_comment": "SDXL inpainting: given an image + mask, regenerate the masked region. Upload both: --input-image image=./photo.png --input-image mask_image=./mask.png. White pixels in mask = regenerate; black = preserve.",
  3. "1": {
  4. "class_type": "LoadImage",
  5. "_meta": {"title": "Load Source"},
  6. "inputs": {"image": "REPLACE_WITH_UPLOADED_FILENAME.png"}
  7. },
  8. "2": {
  9. "class_type": "LoadImageMask",
  10. "_meta": {"title": "Load Mask"},
  11. "inputs": {"image": "REPLACE_WITH_UPLOADED_MASK.png", "channel": "red"}
  12. },
  13. "3": {
  14. "class_type": "KSampler",
  15. "_meta": {"title": "KSampler"},
  16. "inputs": {
  17. "seed": 42,
  18. "steps": 30,
  19. "cfg": 7.5,
  20. "sampler_name": "dpmpp_2m",
  21. "scheduler": "karras",
  22. "denoise": 1.0,
  23. "model": ["4", 0],
  24. "positive": ["6", 0],
  25. "negative": ["7", 0],
  26. "latent_image": ["12", 0]
  27. }
  28. },
  29. "4": {
  30. "class_type": "CheckpointLoaderSimple",
  31. "_meta": {"title": "Checkpoint"},
  32. "inputs": {"ckpt_name": "sd_xl_base_1.0.safetensors"}
  33. },
  34. "6": {
  35. "class_type": "CLIPTextEncode",
  36. "_meta": {"title": "Positive Prompt"},
  37. "inputs": {"text": "fill with blooming flowers, photorealistic", "clip": ["4", 1]}
  38. },
  39. "7": {
  40. "class_type": "CLIPTextEncode",
  41. "_meta": {"title": "Negative Prompt"},
  42. "inputs": {"text": "ugly, blurry, deformed, bad anatomy", "clip": ["4", 1]}
  43. },
  44. "8": {
  45. "class_type": "VAEDecode",
  46. "_meta": {"title": "VAE Decode"},
  47. "inputs": {"samples": ["3", 0], "vae": ["4", 2]}
  48. },
  49. "9": {
  50. "class_type": "SaveImage",
  51. "_meta": {"title": "Save"},
  52. "inputs": {"filename_prefix": "sdxl_inpaint", "images": ["8", 0]}
  53. },
  54. "12": {
  55. "class_type": "VAEEncodeForInpaint",
  56. "_meta": {"title": "VAE Encode for Inpaint"},
  57. "inputs": {"pixels": ["1", 0], "mask": ["2", 0], "vae": ["4", 2], "grow_mask_by": 6}
  58. }
  59. }