mmagic.datasets.textual_inversion_dataset
¶
Module Contents¶
Classes¶
Dataset for Textual Inversion and ViCo. |
- class mmagic.datasets.textual_inversion_dataset.TextualInversionDataset(data_root: str, concept_dir: str, placeholder: str, template: str, with_image_reference: bool = False, pipeline: List[Union[dict, Callable]] = [])[source]¶
Bases:
mmengine.dataset.BaseDataset
Dataset for Textual Inversion and ViCo.
- Parameters
data_root (str) – Path to the data root.
concept_dir (str) – Path to the concept images.
placeholder (str) – A string to denote the concept.
template (list[str]) – A list of strings like ‘A photo of {}’.
with_image_reference (bool) – Is used for vico training.
pipeline (list[dict | callable]) – A sequence of data transforms.