数据集:
FredZhang7/stable-diffusion-prompts-2.47M
Combined text-only dataset from
For preprocessing methods, please see Fast GPT2 PromptGen .
Download and save the dataset to all_prompts.txt locally.
pip install datasets
import datasets dataset = datasets.load_dataset("FredZhang7/stable-diffusion-prompts-2.47M") train = dataset["train"] prompts = train["text"] with open("all_prompts.txt", "w") as f: for prompt in prompts: f.write(prompt + "\n")