nomic 3.1.0__tar.gz → 3.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nomic might be problematic. Click here for more details.
- {nomic-3.1.0 → nomic-3.1.2}/PKG-INFO +1 -1
- {nomic-3.1.0 → nomic-3.1.2}/nomic/dataset.py +3 -1
- {nomic-3.1.0 → nomic-3.1.2}/nomic.egg-info/PKG-INFO +1 -1
- {nomic-3.1.0 → nomic-3.1.2}/setup.py +1 -1
- {nomic-3.1.0 → nomic-3.1.2}/README.md +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/__init__.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/atlas.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/aws/__init__.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/aws/sagemaker.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/cli.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/data_inference.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/data_operations.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/embed.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/pl_callbacks/__init__.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/pl_callbacks/pl_callback.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/settings.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic/utils.py +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic.egg-info/SOURCES.txt +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic.egg-info/dependency_links.txt +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic.egg-info/entry_points.txt +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic.egg-info/requires.txt +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/nomic.egg-info/top_level.txt +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/pyproject.toml +0 -0
- {nomic-3.1.0 → nomic-3.1.2}/setup.cfg +0 -0
|
@@ -1409,9 +1409,10 @@ class AtlasDataset(AtlasClass):
|
|
|
1409
1409
|
# TODO: add support for other modalities
|
|
1410
1410
|
images = []
|
|
1411
1411
|
for uuid, blob in tqdm(zip(ids, blobs), total=len(ids), desc="Loading images"):
|
|
1412
|
-
if isinstance(blob, str) and os.path.exists(blob):
|
|
1412
|
+
if (isinstance(blob, str) or isinstance(blob, Path)) and os.path.exists(blob):
|
|
1413
1413
|
# Auto resize to max 512x512
|
|
1414
1414
|
image = Image.open(blob)
|
|
1415
|
+
image = image.convert("RGB")
|
|
1415
1416
|
if image.height > 512 or image.width > 512:
|
|
1416
1417
|
image = image.resize((512, 512))
|
|
1417
1418
|
buffered = BytesIO()
|
|
@@ -1420,6 +1421,7 @@ class AtlasDataset(AtlasClass):
|
|
|
1420
1421
|
elif isinstance(blob, bytes):
|
|
1421
1422
|
images.append((uuid, blob))
|
|
1422
1423
|
elif isinstance(blob, Image.Image):
|
|
1424
|
+
blob = blob.convert("RGB") # type: ignore
|
|
1423
1425
|
if blob.height > 512 or blob.width > 512:
|
|
1424
1426
|
blob = blob.resize((512, 512))
|
|
1425
1427
|
buffered = BytesIO()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|