Model
Trends
.ai
Model
Trends
.ai
les meilleurs modèles d'IA open source

Nœud Load Image dans ComfyUI

Load Image reads a picture from the ComfyUI input folder (or an upload) and outputs an IMAGE tensor plus a MASK taken from the alpha channel, the starting point for img2img, inpainting, ControlNet and IP-Adapter graphs.
Pack de nœuds : ComfyUI core
Catégorie : Image
Cette page n'est pas encore traduite ; elle est affichée en anglais.

Ce que fait Load Image

Load Image is how pixels enter a graph. It lists the files in ComfyUI/input, lets you upload a new file with the button or by dragging it onto the node, and outputs the picture as an IMAGE (a float tensor in the 0-1 range, shape batch x height x width x 3). The second output, MASK, is built from the transparency of the file: transparent pixels become 1 (masked), opaque pixels 0. A JPEG without alpha gives an all-black mask of the same size.
Right-click the node and choose "Open in MaskEditor" to paint a mask over the picture. The editor saves a copy of the file with the painted area as transparency (clipspace folder), so the MASK output carries your painting. That is the usual route for inpainting: Load Image -> MASK -> Set Latent Noise Mask or VAE Encode (for Inpainting).

Entrées

Nom
Type
Rôle
image
COMBO/upload
A file from ComfyUI/input or a file you upload. PNG, JPEG, WebP and most formats PIL can open.

Sorties

Nom
Type
Rôle
IMAGE
IMAGE
The picture as a tensor. Connect it to VAE Encode, ControlNet preprocessors, IP-Adapter, upscalers or Save Image.
MASK
MASK
Alpha channel as a mask (1 where the picture is transparent or painted in the mask editor).
AD
Oubliez l'installation : des workflows ComfyUI préinstallés sur le cloud
BitVector exécute des workflows ComfyUI prêts à l'emploi sur ses propres GPU. Rien à installer, aucun nœud manquant, aucune case rouge. Ouvrez-le sur votre téléphone ou votre portable et générez en une minute.

Comment utiliser Load Image

  1. Add the node (search "Load Image") and press "choose file to upload" or drop a file onto it.
  2. For img2img, connect IMAGE to VAE Encode and the resulting LATENT to KSampler with denoise around 0.5.
  3. For inpainting, right-click the node, open the Mask Editor, paint the area, save, and connect MASK to Set Latent Noise Mask.
  4. For ControlNet, connect IMAGE to the preprocessor (Canny, Depth, OpenPose) before Apply ControlNet.
  5. Keep the input size close to the model resolution; resize with Upscale Image first if it is huge.

Réglages et conseils

  • EXIF orientation is honoured, so phone photos load upright.
  • The node caches the file; if you overwrite a file with the same name, pick it again or press R to reload.
  • Loading a 4000 px photo straight into VAE Encode uses a lot of VRAM. Scale it down first.
  • Transparent PNGs from Photoshop give a ready-made MASK without the editor.
  • Batch several images with Load Image Batch (WAS) or the core Image Batch node when you need more than one.

Dépannage de Load Image

Prompt outputs failed validation: Invalid image file

Pourquoi cela arrive
The workflow refers to a file name that is not in your input folder (a shared workflow), or the upload failed.

Comment le corriger
Upload the picture again with the button; the name in the widget must match a file in ComfyUI/input. Shared workflows always need their input images re-uploaded.

MASK output is empty / inpainting changes nothing

Pourquoi cela arrive
The picture has no transparency and nothing was painted in the Mask Editor, so the mask is all zeros.

Comment le corriger
Open the Mask Editor from the right-click menu, paint the area and save; or feed a mask from Load Image (as Mask) or a segmentation node.

The whole picture is masked instead of the painted area

Pourquoi cela arrive
The mask is inverted for the node that uses it, or the image has a fully transparent alpha channel.

Comment le corriger
Insert an Invert Mask node, or flatten the picture to remove the alpha before uploading.

Upload button does nothing or the browser hangs

Pourquoi cela arrive
The file is very large or the server blocks uploads (for example when started with --disable-metadata or behind a proxy that limits body size).

Comment le corriger
Copy the file into ComfyUI/input manually and pick it from the dropdown after pressing R.

AD
Lancez ce workflow depuis votre téléphone
Chaque workflow de cette page est préinstallé sur BitVector, modèles et nœuds personnalisés déjà en place. Choisissez-en un, tapez un prompt, c'est fait. Zéro configuration, rien à télécharger.

Questions sur Load Image

Can I load an image from a URL?

Not with the core node. Custom packs (WAS, LoadImageFromUrl) add that; or download the file into the input folder.

Why are my colours slightly different after Load Image -> Save Image?

The pipeline converts to 8-bit RGB. Colour profiles are not applied, so wide-gamut or CMYK files shift. Convert to sRGB first.

What size should the picture be?

Any size works, but VAE Encode needs multiples of 8 pixels and large pictures cost VRAM. Most models like 1024 px on the long edge.

Nœuds liés

VAE Encode and VAE Encode (for Inpainting)
ComfyUI core
VAE Encode converts a pixel IMAGE into a LATENT for img2img; VAE Encode (for Inpainting) does the same while blanking the masked area so an inpainting model can repaint it.
Load Image (as Mask)
ComfyUI core
Load Image (as Mask) turns one channel of a picture (alpha, red, green or blue) into a MASK, so black-and-white mask files or painted layers can drive inpainting and compositing.
Save Image
ComfyUI core
Save Image writes the IMAGE tensor to ComfyUI/output as a PNG, with the whole workflow embedded in the file metadata so the picture can be dragged back into ComfyUI to restore the graph.
Apply ControlNet
ComfyUI core
Apply ControlNet attaches a guide image and a loaded ControlNet to the positive and negative CONDITIONING with strength and start/end percentages, so the sampler follows edges, depth or pose from the guide.
Upscale Image and Upscale Image By
ComfyUI core
Upscale Image (ImageScale) and Upscale Image By resize an IMAGE with classic interpolation (nearest, bilinear, bicubic, lanczos, area) to an exact size or by a factor, with no AI model involved.
AD
Marre de réparer des nœuds ? Laissez faire le cloud
BitVector garde des centaines de workflows ComfyUI installés, à jour et testés sur des GPU cloud rapides. Pas de Python, pas d'erreurs CUDA, pas de limite de VRAM. Depuis n'importe quel navigateur.

Autres nœuds ComfyUI

CLIP Text Encode (Prompt)
ComfyUI core
CLIP Text Encode turns a text prompt into CONDITIONING using the model text encoder. One node holds the positive prompt, a second one the negative prompt.
ComfyUI Manager
ComfyUI-Manager
ComfyUI Manager is the extension that installs, updates and fixes custom node packs and models from inside the interface, resolves missing nodes in imported workflows and snapshots your setup.
KSampler
ComfyUI core
KSampler runs the denoising loop: it takes the model, prompts and a latent and produces the finished latent image, controlled by seed, steps, cfg, sampler, scheduler and denoise.
Load Checkpoint
ComfyUI core
Load Checkpoint (CheckpointLoaderSimple) opens a .safetensors or .ckpt model file and hands out the three parts every workflow needs: the diffusion MODEL, the CLIP text encoder and the VAE.
VAE Decode
ComfyUI core
VAE Decode converts the sampled LATENT into a pixel IMAGE with the VAE; VAE Decode (Tiled) does the same in tiles for very large images.
Empty Latent Image
ComfyUI core
Empty Latent Image creates the blank latent canvas (width, height, batch_size) that text-to-image sampling starts from; dimensions must be multiples of 8 and match the model family.