cocktailpeanut / fluxgym

Dead simple FLUX LoRA training UI with LOW VRAM support
MIT License
1.38k stars 116 forks source link

Text files empty #111

Open AndreR opened 2 months ago

AndreR commented 2 months ago

When using this with Pinokio, the text files in the datasets folder are always 0 bytes (empty). Hence the training fails. I'm loading the images together with the text files into the GUI. How can I solve that? It works when using Florence 2 to generate the texts.

6Morpheus6 commented 2 months ago

@AndreR Fluxgym works different. Only load the images into the GUI. If you don't want to use Florence to generate your captions, enter the captions by yourself in the gui. You can do it in the caption fields of your images. Training will fail if no images are loaded.

AndreR commented 2 months ago

@6Morpheus6 I see. The strange thing is that it actually imports the texts into the GUI if I select the .txt files as well. So from a user's standpoint, importing those text files works, but it seems like there are some bindings in the background that are not executed properly. The texts appear in the UI, but they are not exported to the datasets folder.

ANTONIOPSD commented 2 months ago

i think It fails if the captions contain characters like quotes ("" or '') because they break the strings in python The code must be modified to parse the captions correctly.

Arnold2006 commented 2 months ago

Can confirm that's the problem " and ' does not work in the caption files

AndreR commented 2 months ago

@Arnold2006 Hey, I just checked my files and that's actually the case. Any quick fix for that?

Arnold2006 commented 2 months ago

@Arnold2006 Hey, I just checked my files and that's actually the case. Any quick fix for that?

I just removed the offending quotes "" and '

6Morpheus6 commented 1 month ago

@Arnold2006 Hey, I just checked my files and that's actually the case. Any quick fix for that?

From what I know there is no quick fix. The captions may not contain non-Unicode letters. You need to sort them out. Text files seem to work, but there is a file upload limit due to gradio. I think altogether the maximum files you can upload is 100.