jjihwan / FIFO-Diffusion_public

Official implementation of FIFO-Diffusion
https://jjihwan.github.io
277 stars 17 forks source link

Long prompts kill the movie output #9

Closed SoftologyPro closed 1 month ago

SoftologyPro commented 1 month ago

Firstly, many thanks for the MP4 format and the output directory parameters. They work fine and save me having to add extra code for patching the script and moving movies after the script finishes.

One other issue is with longer prompts in Windows (with the 256 char max for directory and filename). If the output dir and the filename are longer than 256 characters the output movie is not created under Windows. Could you add a check for length of output_dir+movie are under 250 chars and if not trim the name shorter to fit?

For example, if this prompt is used A colony of penguins waddling on an Antarctic ice sheet they are all wearing hats and coats and boots and dancing together, the sun is shining brightly, there are clouds in the sky, a polar bear can be seen in the background heading towards the penguins and he looks hungry it is already 274 characters and past the 256 char limit in windows.

The script fails and reports OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'results/videocraft_v2_fifo/latents/64steps/A colony of penguins waddling on an Antarctic ice sheet they are all wearing hats and coats and boots and dancing together, the sun is shining brightly, there are clouds in the sky, a polar bear can be seen in the background heading towards the penguins and he looks hungry' The system cannot find the path specified. Short prompts work fine.

jjihwan commented 1 month ago

Thank you for the report. Since VideoCrafter2 does not have a good text encoder, we do not recommend using long prompts. However, for better usability, we have slightly changed the code to solve the issue by slicing the prompt for the saving folder.

SoftologyPro commented 1 month ago

Thanks. That gets around the issue. You may not recommend long prompts, but that does not stop people trying :)

jjihwan commented 1 month ago

That's right 😅