HOW? im newbie

#7
by Megalino111 - opened

Hi, I'm new in this
I've looking for a tutorial that teach me how to do my text-image dataset, but I have not found anything, I have like 10 images to train a stable diffusion model v2, but Idk how to do it
I hope someone can help me

Hi,
So, when you have prepare the text-image dataset, it should be like the following:
dataset_folder/images, metadata.csv
NOTE: Inside metadata.csv you should have file_name, text and two columns

Then simply load your dataset from your local directory like this:
from datasets import load_dataset
dataset = load_dataset(“imagefolder”, data_dir=“dataset_folder”, split=“train”)
Now before uploading your dataset to hub, create a new dataset on your Hugging Face profile, if you set the dataset name to for example, "username/dataset_1" then in the next step you are ready to upload
Now login to your Hugging Face with CLI
Then upload to hud:
dataset.push_to_hub(“username/dataset_1”)

This comment has been hidden

Sign up or log in to comment