feat: Add inpainting (局部重绘) feature for timeline editor
- Add canvas-based mask drawing tools (brush, eraser, rect, lasso) - Add undo/redo history support for mask editing - Integrate inpainting UI into preview player - Add backend API endpoint for inpainting requests - Add MediaService.inpaint method with ComfyUI workflow support - Add Flux inpainting workflows for selfhost and RunningHub 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
149
workflows/selfhost/image_inpaint_flux.json
Normal file
149
workflows/selfhost/image_inpaint_flux.json
Normal file
@@ -0,0 +1,149 @@
|
||||
{
|
||||
"10": {
|
||||
"inputs": {
|
||||
"image": ""
|
||||
},
|
||||
"class_type": "LoadImage",
|
||||
"_meta": {
|
||||
"title": "$image.value!"
|
||||
}
|
||||
},
|
||||
"11": {
|
||||
"inputs": {
|
||||
"image": "",
|
||||
"channel": "alpha"
|
||||
},
|
||||
"class_type": "LoadImageMask",
|
||||
"_meta": {
|
||||
"title": "$mask.value!"
|
||||
}
|
||||
},
|
||||
"12": {
|
||||
"inputs": {
|
||||
"grow_mask_by": 6,
|
||||
"pixels": ["10", 0],
|
||||
"vae": ["49", 0],
|
||||
"mask": ["11", 0]
|
||||
},
|
||||
"class_type": "VAEEncodeForInpaint",
|
||||
"_meta": {
|
||||
"title": "VAE Encode (for Inpainting)"
|
||||
}
|
||||
},
|
||||
"29": {
|
||||
"inputs": {
|
||||
"seed": 1067822190154760,
|
||||
"steps": 20,
|
||||
"cfg": 1,
|
||||
"sampler_name": "euler",
|
||||
"scheduler": "simple",
|
||||
"denoise": 0.8,
|
||||
"model": ["48", 0],
|
||||
"positive": ["35", 0],
|
||||
"negative": ["33", 0],
|
||||
"latent_image": ["12", 0]
|
||||
},
|
||||
"class_type": "KSampler",
|
||||
"_meta": {
|
||||
"title": "KSampler"
|
||||
}
|
||||
},
|
||||
"30": {
|
||||
"inputs": {
|
||||
"value": 0.8
|
||||
},
|
||||
"class_type": "easy float",
|
||||
"_meta": {
|
||||
"title": "$denoise.value"
|
||||
}
|
||||
},
|
||||
"31": {
|
||||
"inputs": {
|
||||
"text": ["46", 0],
|
||||
"clip": ["47", 0]
|
||||
},
|
||||
"class_type": "CLIPTextEncode",
|
||||
"_meta": {
|
||||
"title": "CLIP Text Encode (Prompt)"
|
||||
}
|
||||
},
|
||||
"33": {
|
||||
"inputs": {
|
||||
"conditioning": ["31", 0]
|
||||
},
|
||||
"class_type": "ConditioningZeroOut",
|
||||
"_meta": {
|
||||
"title": "ConditioningZeroOut"
|
||||
}
|
||||
},
|
||||
"35": {
|
||||
"inputs": {
|
||||
"guidance": 3.5,
|
||||
"conditioning": ["31", 0]
|
||||
},
|
||||
"class_type": "FluxGuidance",
|
||||
"_meta": {
|
||||
"title": "FluxGuidance"
|
||||
}
|
||||
},
|
||||
"36": {
|
||||
"inputs": {
|
||||
"filename_prefix": "inpaint",
|
||||
"images": ["37", 0]
|
||||
},
|
||||
"class_type": "SaveImage",
|
||||
"_meta": {
|
||||
"title": "Save Image"
|
||||
}
|
||||
},
|
||||
"37": {
|
||||
"inputs": {
|
||||
"samples": ["29", 0],
|
||||
"vae": ["49", 0]
|
||||
},
|
||||
"class_type": "VAEDecode",
|
||||
"_meta": {
|
||||
"title": "VAE Decode"
|
||||
}
|
||||
},
|
||||
"46": {
|
||||
"inputs": {
|
||||
"value": "inpaint region"
|
||||
},
|
||||
"class_type": "PrimitiveStringMultiline",
|
||||
"_meta": {
|
||||
"title": "$prompt.value!"
|
||||
}
|
||||
},
|
||||
"47": {
|
||||
"inputs": {
|
||||
"clip_name1": "clip_l.safetensors",
|
||||
"clip_name2": "t5xxl_fp8_e4m3fn.safetensors",
|
||||
"type": "flux",
|
||||
"device": "default"
|
||||
},
|
||||
"class_type": "DualCLIPLoader",
|
||||
"_meta": {
|
||||
"title": "DualCLIPLoader"
|
||||
}
|
||||
},
|
||||
"48": {
|
||||
"inputs": {
|
||||
"unet_name": "flux1-dev.safetensors",
|
||||
"weight_dtype": "default"
|
||||
},
|
||||
"class_type": "UNETLoader",
|
||||
"_meta": {
|
||||
"title": "Load Diffusion Model"
|
||||
}
|
||||
},
|
||||
"49": {
|
||||
"inputs": {
|
||||
"vae_name": "ae.safetensors"
|
||||
},
|
||||
"class_type": "VAELoader",
|
||||
"_meta": {
|
||||
"title": "Load VAE"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user