Pixel layout Core ML should hand the model.
Names the order the model's own channel 0, 1, 2 mean, so that the runtime writes a pixel buffer the right way round. Getting this wrong is silent: the model runs and answers badly, which is the same failure as feeding it an image with the red and blue channels swapped, because that is exactly what it is.
Examples
>>> import shutil, tempfile
>>> import lucid, lucid.nn as nn, lucid.coreml as cml
>>> gray = cml.ImageInput(color=cml.ColorSpace.GRAYSCALE, scale=1 / 255.0)
>>> gray.color
<ColorSpace.GRAYSCALE: 'GRAYSCALE'>
>>> model = nn.Sequential(nn.Conv2d(1, 4, 3, padding=1), nn.ReLU()).eval()
>>> pixels = (lucid.rand(1, 1, 16, 16) * 255).round() # one channel
>>> room = tempfile.mkdtemp()
>>> with cml.export(model, pixels, f"{room}/gray.mlpackage",
... image_input=gray) as package:
... print(package.predict(pixels).shape)
(1, 4, 16, 16)
>>> shutil.rmtree(room)