I work on CloudGPU. Compare the relative-path-to-file-reference mappings first. That gives you added paths, removed paths and paths now pointing to a different saved file. It is a project-version comparison, not a comparison of installed environments or a proof that two files have different bytes.
1. Obtain the two manifests without restoring a GPU
CloudGPU documents immutable Workspace versions. Read the two selected versions using your existing account access or GET /v1/workspace-versions/{id}. Normalize each result into just its relative-path-to-file_id mapping and save the mappings as old.json and new.json. The HTTP response envelope is not assumed to be the mapping itself.
Do not save authorization headers or temporary download URLs in these files. This comparison requires neither downloading the referenced file contents nor creating a Job. Reading your account still depends on its current storage eligibility and key scope.
2. Compare references with a local script
Save as diff_versions.py:
import json
import re
from pathlib import Path
def read_manifest(path):
data = json.loads(Path(path).read_text())
if not isinstance(data, dict) or not data:
raise ValueError("Expected a nonempty path-to-file mapping")
for name, file_id in data.items():
if not isinstance(name, str) or not name:
raise ValueError("Expected a project path")
if not isinstance(file_id, str) or not re.fullmatch(
r"file_[0-9a-f]{32}", file_id
):
raise ValueError(f"Expected a file reference at {name}")
return data
def compare(old, new):
return {
"added": sorted(new.keys() - old.keys()),
"removed": sorted(old.keys() - new.keys()),
"replaced": sorted(
name for name in old.keys() & new.keys()
if old[name] != new[name]
),
}
if __name__ == "__main__":
result = compare(read_manifest("old.json"), read_manifest("new.json"))
print(json.dumps(result, indent=2))
python3 diff_versions.py
This is a comparison helper, not a full manifest validator. It does not create or mutate versions. Review a renamed file as an addition and a removal: the script deliberately does not guess a rename from unrelated metadata.
3. Interpret the result at the correct layer
- An unchanged reference means the path refers to the same saved file object in these mappings.
- A replaced reference means a different file object, not necessarily different content. Download and compare contents separately if that distinction matters.
- A clean diff does not prove that referenced files remain ready or unexpired. Check current file state and storage conditions before a later restoration.
- A version does not track later edits automatically. Preserve your intended changes as a new saved version through the normal explicit workflow.
Workspace is not a whole-machine snapshot. It restores project files, not the operating system, drivers or installed dependencies. Rebuild dependencies separately. Storage has account eligibility, quotas, retention rules and separate charges; a GPU budget does not include storage fees. This recipe makes no claim about unlimited capacity or perpetual retention.
The CloudGPU integration and Workspace guide describes the file-version boundary and links the current OpenAPI contract. The file-reference pattern in the helper follows the version-creation schema; it does not assume a particular read-response envelope. Python's JSON documentation covers the local serialization.
Related CloudGPU video: How to Make an AI Short Drama Without Wasting GPU Minutes. A revised shot project is a useful reason to review file changes; this is contextual viewing, not a demonstration of this version-diff program.
https://www.youtube.com/watch?v=EOc5rh8MfVk
The local code was syntax-checked and exercised with synthetic manifests. No account files were read, restored or uploaded, and no GPU was rented for this answer.
Comments
Join the discussionNo comments yet. Be the first to comment.