MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / __init__

Method __init__

diffusers/examples/amused/train_amused.py:345–359  ·  view source on GitHub ↗
(
        self,
        hf_dataset,
        tokenizer,
        image_key,
        prompt_key,
        prompt_prefix=None,
        size=512,
    )

Source from the content-addressed store, hash-verified

343
344class HuggingFaceDataset(Dataset):
345 def __init__(
346 self,
347 hf_dataset,
348 tokenizer,
349 image_key,
350 prompt_key,
351 prompt_prefix=None,
352 size=512,
353 ):
354 self.size = size
355 self.image_key = image_key
356 self.prompt_key = prompt_key
357 self.tokenizer = tokenizer
358 self.hf_dataset = hf_dataset
359 self.prompt_prefix = prompt_prefix
360
361 def __len__(self):
362 return len(self.hf_dataset)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected