Allow images; Remove LLM generated prefixes; Allow JSON/JSONL; Fix bugs (#158)

* update

* update

* fix

* Update finetrainers/dataset.py

* update

* argument for enabling remove of common llm prefixes

* update

* make new generator for validation

* update

* update

* update

* update

* update
This commit is contained in:
Aryan
2025-01-06 18:52:54 +05:30
committed by GitHub
parent eeb4dd7afa
commit 38413aa167
6 changed files with 301 additions and 73 deletions
+26
View File
@@ -52,3 +52,29 @@ For more details, including weighting, merging and fusing LoRAs, check the [docu
Please adhere to the license of the base model.
""".strip()
_COMMON_BEGINNING_PHRASES = (
"This video",
"The video",
"This clip",
"The clip",
"The animation",
"This image",
"The image",
"This picture",
"The picture",
)
_COMMON_CONTINUATION_WORDS = ("shows", "depicts", "features", "captures", "highlights", "introduces", "presents")
COMMON_LLM_START_PHRASES = (
"In the video,",
"In this video,",
"In this video clip,",
"In the clip,",
"Caption:",
*(
f"{beginning} {continuation}"
for beginning in _COMMON_BEGINNING_PHRASES
for continuation in _COMMON_CONTINUATION_WORDS
),
)