- Only the first image of a batch was uploaded; the rest were silently dropped. Every image is now uploaded (single images keep the plain "<prefix>.<ext>" name, batches are numbered _001, _002, ...). - Folder names containing an apostrophe broke the Drive search query. - The placeholder json/credentials.json and token.json shipped with the node produced confusing JSON errors; they're now detected and the node says exactly which file to replace. - Credentials and the Drive client are reused between runs, and folder IDs are cached per path, so repeat saves skip the folder lookups (previously every save re-read the token, rebuilt the client and searched each folder). - Images under 5 MB upload in a single request instead of a resumable upload session. - Works with GPU tensors (.cpu() before .numpy()). - Removed unused imports and the WEB_DIRECTORY that pointed at a nonexistent folder; version 1.2.0 in pyproject.toml and __init__. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Lm4YDXhwj49hAA1RKS58Q
1.4 KiB
ComfyUI-Save_To_GDrive
This ComfyUI node will save images directly to Google Drive by using Google's free API service.
Save Image To Google Drive
IMPORTANT
If you don't know how to get the credentials from Google, I have made a very detailed guide on how. The guide is available on my Patreon: Save Image To Google Drive - Guide
INSTRUCTIONS
This node and it's code is completely free to use. It should be noted that you will have to get your own API credentials with Google in order for the node to work preperly. The credentials are needed to give the node access to your Google drive and to create folders as well as save images and videos.
The node will create folders you specify in the node itself if they aren't already created in your Google drive.
Folder structure: Rootfolder/subfolder/subfolder
Filename prefix: All images will have the same name, so if the prefix is for example "IMG" all your saved images will be named IMG.png (alternatively IMG.jpeg or IMG.webp). When you send a batch of several images, they are numbered: IMG_001.png, IMG_002.png and so on.
File Format: Format available is PNG, JPEG and WEBP