Upload hf_nemotron_parse_processor.py with huggingface_hub
Browse files
hf_nemotron_parse_processor.py
CHANGED
|
@@ -199,6 +199,10 @@ class NemotronParseImageProcessor(BaseImageProcessor, ImageProcessingMixin):
|
|
| 199 |
# Ensure images is a list
|
| 200 |
if not isinstance(images, list):
|
| 201 |
images = [images]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
|
| 203 |
# Convert PIL images to numpy arrays if needed
|
| 204 |
processed_images = []
|
|
|
|
| 199 |
# Ensure images is a list
|
| 200 |
if not isinstance(images, list):
|
| 201 |
images = [images]
|
| 202 |
+
|
| 203 |
+
# Ensure images are RGB
|
| 204 |
+
for i in range(len(images)):
|
| 205 |
+
images[i] = images[i].convert('RGB')
|
| 206 |
|
| 207 |
# Convert PIL images to numpy arrays if needed
|
| 208 |
processed_images = []
|