csxmli2016 / w-plus-adapter

[CVPR 2024] When StyleGAN Meets Stable Diffusion: a W+ Adapter for Personalized Image Generation
Other
109 stars 7 forks source link

The format of the txt file when running train.py. #7

Open gaoyixuan111 opened 4 months ago

gaoyixuan111 commented 4 months ago

"Thank you for your response. When I run train_wild.py, I don't understand how the 'f = open('./Face/ffhq_wild_names_with_caption.txt', 'r')' part is supposed to be constructed. In the txt file I created, it looks like this: 02198_0.png A man wearing a hat and glasses 02201_0.png a young girl wearing a helmet and a purple jacket Could you provide some examples of the format for this txt file?" The error message I always receive is similar to "FileNotFoundError: [Errno 2] No such file or directory: './Face/FFHQ512_e4e_nobg_w_plus/00001_0.png A baby in a blue blan.pth'."

csxmli2016 commented 4 months ago

"Thank you for your response. When I run train_wild.py, I don't understand how the 'f = open('./Face/ffhq_wild_names_with_caption.txt', 'r')' part is supposed to be constructed. In the txt file I created, it looks like this: 02198_0.png A man wearing a hat and glasses 02201_0.png a young girl wearing a helmet and a purple jacket Could you provide some examples of the format for this txt file?" The error message I always receive is similar to "FileNotFoundError: [Errno 2] No such file or directory: './Face/FFHQ512_e4e_nobg_w_plus/00001_0.png A baby in a blue blan.pth'."

The example of ffhq_wild_names_with_caption.txt is the name of ffhq: 000001.png 000002.png ....

without the caption in your example.

Please kindly refer to the code at https://github.com/csxmli2016/w-plus-adapter/blob/b88bc0a5aedf652e0cedde721320c974dd775a3a/train_wild.py#L65

with_caption in the file name represents that some ffhq-in-the-wild images did not have valid caption and therefore we removed these without captions.