Support loading images from arbitrary paths
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 153
Description
Currently, the LoadImage node only uses images in the `.\input\` folder. When using the API, I have to copy the image(s) I want to use into that folder before calling the API.
I would like to request the ability to supply the API with arbitrary filesystem paths, like `D:/Files/001.png`. Here is an example prompt:
```json
{
"3": {
"inputs": {
"seed": 272520401961745,
"steps": 20,
"cfg": 8.0,
"sampler_name": "dpmpp_2m",
"scheduler": "karras",
"denoise": 0.6,
"model": ["4", 0],
"positive": ["49", 0],
"negative": ["46", 0],
"latent_image": ["38", 0]
},
"class_type": "KSampler"
},
"4": {
"inputs": {
"config_name": "v1-inference_clip_skip_2.yaml",
"ckpt_name": "Anything-V3.0-pruned-fp16.ckpt"
},
"class_type": "CheckpointLoader"
},
"8": {
"inputs": { "samples": ["3", 0], "vae": ["4", 2] },
"class_type": "VAEDecode"
},
"9": {
"inputs": { "filename_prefix": "ComfyUI", "images": ["8", 0] },
"class_type": "SaveImage"
},
"20": {
"inputs": { "image": "D:/sd/raw-hed.png", "choose file to upload": "image" },
"class_type": "LoadImage",
"is_changed": "ad56109807a198023d5ec961aa415787b5fabb9a37d2102df55b81ac5a06420d"
},
"24": {
"inputs": {
"text": "masterpiece, best quality, 1girl,",
"clip": ["4", 1]
},
"class_type": "CLIPTextEncode"
},
"37": {
"inputs": { "image": "D:/sd/raw-img2img.png", "choose file to upload": "image" },
"class_type": "LoadImage",
"is_changed": "045a75c45c361f22deb650a298a776210cfee88f62030785eece5728f605213b"
},
"38": {
"inputs": { "pixels": ["37", 0], "vae": ["4", 2] },
"class_type": "VAEEncode"
},
"46": {
"inputs": {
"text": "embedding:EasyNegative, embedding:bad-artist, embedding:bad-hands-5, (hands), ",
"clip": ["4", 1]
},
"class_type": "CLIPTextEncode"
},
"49": {
"inputs": {
"strength": 1.0,
"conditioning": ["24", 0],
"control_net": ["50", 0],
"image": ["20", 0]
},
"class_type": "ControlNetApply"
},
"50": {
"inputs": {
"control_net_name": "diff_control_sd15_hed_fp16.safetensors",
"model": ["4", 0]
},
"class_type": "DiffControlNetLoader"
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.