MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / __init__

Method __init__

examples/amused/train_amused.py:326–333  ·  view source on GitHub ↗
(
        self,
        instance_data_image,
        train_batch_size,
        size=512,
    )

Source from the content-addressed store, hash-verified

324
325class InstanceDataImageDataset(Dataset):
326 def __init__(
327 self,
328 instance_data_image,
329 train_batch_size,
330 size=512,
331 ):
332 self.value = process_image(Image.open(instance_data_image), size)
333 self.train_batch_size = train_batch_size
334
335 def __len__(self):
336 # Needed so a full batch of the data can be returned. Otherwise will return

Callers

nothing calls this directly

Calls 1

process_imageFunction · 0.85

Tested by

no test coverage detected