📥 Google Drive Download:
The ArchAi3D_GDrive_Download node is designed to facilitate the downloading of files from Google Drive, specifically tailored for AI artists who need to access large models or datasets stored on this platform. This node provides a seamless way to download files using either a Google Drive file ID or a public share link, offering flexibility in accessing resources. It supports custom renaming of downloaded files and allows you to specify the directory where the files should be saved. The node primarily utilizes the gdown library, known for its reliability in handling large file downloads, but also includes a fallback mechanism using the requests library if gdown is not available. This ensures that downloads are robust and can proceed even in environments where certain dependencies might be missing. The node is particularly beneficial for those working with large AI models, as it simplifies the process of acquiring necessary files directly from Google Drive, thus enhancing workflow efficiency.
📥 Google Drive Download Input Parameters:
file_id_or_link
This parameter accepts either a Google Drive file ID or a public share link. It is crucial for identifying the specific file you wish to download. The node extracts the file ID from the input to initiate the download process. There are no specific minimum or maximum values, but the input must be a valid Google Drive identifier or URL.
filename
This parameter specifies the name under which the downloaded file will be saved. It allows for custom naming, which can be useful for organizing files or avoiding name conflicts. The filename must be provided, as it is required for the download process to proceed.
save_dir
This parameter determines the directory where the downloaded file will be stored. It helps in organizing files within your local system. The directory path should be valid and writable.
node_id
This optional parameter is used to identify the node instance, particularly useful in complex workflows where multiple nodes are involved. It does not directly affect the download process.
overwrite
This boolean parameter indicates whether an existing file with the same name should be replaced. If set to True, the node will overwrite any existing file with the same name in the specified directory. The default value is False.
save_dir_override
This optional parameter allows you to specify an alternative directory for saving the downloaded file, overriding the save_dir parameter. It provides flexibility in file management.
fuzzy
This boolean parameter, when set to True, enables a more lenient approach in matching file IDs from the input. It is useful when dealing with slightly malformed or incomplete links. The default value is True.
📥 Google Drive Download Output Parameters:
result
The output parameter result indicates the success or failure of the download operation. If the download is successful, it returns a confirmation message or the path to the downloaded file. In case of failure, it provides an error message detailing the issue encountered.
📥 Google Drive Download Usage Tips:
- Ensure that the
gdownlibrary is installed for more reliable downloads, especially for large files. You can install it usingpip install gdown. - Use the
overwriteparameter judiciously to prevent accidental loss of existing files. Set it toTrueonly when you are sure you want to replace an existing file. - Utilize the
save_dir_overrideparameter to manage file storage dynamically, especially in environments with specific directory structures.
📥 Google Drive Download Common Errors and Solutions:
ERROR: Missing file ID or link
- Explanation: This error occurs when the
file_id_or_linkparameter is not provided. - Solution: Ensure that you input a valid Google Drive file ID or share link before running the node.
ERROR: Filename is required for Google Drive downloads
- Explanation: This error indicates that the
filenameparameter is missing, which is necessary for saving the downloaded file. - Solution: Provide a valid filename to proceed with the download.
ERROR: Could not extract file ID from input
- Explanation: The node was unable to extract a valid file ID from the provided input.
- Solution: Verify that the input is a correct Google Drive file ID or share link and try again.
File already exists: <filename>
- Explanation: A file with the specified name already exists in the target directory, and
overwriteis set toFalse. - Solution: Either enable the
overwriteoption or choose a different filename to avoid conflicts.
