Fix: SD.Next Video Saving To Subdirectory Error
Hey everyone, so I ran into a bit of a snag while trying to save videos to subdirectories in SD.Next using WAN. Thought I'd share the details and how to fix it, because let's be honest, we've all been there! The core issue? Instead of the actual sequence of video files being saved correctly in the subdirectory I specified, the program was creating a directory named [seq]-... and then trying (and failing) to write the video files there. This threw a FileNotFoundError, and it was a real head-scratcher. But after some digging and a chat with the awesome vladmandic, we got to the bottom of it. I'm going to walk you through the problem, the solution, and hopefully, save you some time and frustration. Let's dive in!
The Problem: SD.Next's Video Saving Glitch
So, here's the lowdown. I was using SD.Next's WAN feature to create some videos, and I wanted those videos neatly organized into subdirectories. I set up my output directory, expecting the videos to be saved with a proper sequence of filenames, all nice and tidy in their designated folder. But what actually happened was quite different. SD.Next decided to get a little creative and, instead of saving the video files as expected, it started making a directory with a name like [seq]-2025-11-02-Wan2.2-TI2V-5B-Diffusers. Then, it tried to write the video files inside this oddly named directory. Of course, the application couldn't find the directory to save the files, which meant all sorts of errors, and ultimately, no video saved.
The error message I was seeing was a FileNotFoundError, specifically FileNotFoundError: [Errno 2] No such file or directory: 'outputs\video\2025-11-02\00001-2025-11-02-Wan2.2-TI2V-5B-Diffusers\00001-2025-11-02-Wan2.2-TI2V-5B-Diffusers.mp4'. This message clearly showed that the program was looking for a file in a non-existent directory. It was a classic case of the program not understanding how to create and use the subdirectories I had set up. This kind of problem can be super annoying when you're trying to keep your files organized. It really messes with your workflow and can slow down the whole creative process. Thankfully, we have figured out a solution.
Detailed Breakdown of the Issue
Let's break down exactly what was happening: SD.Next was trying to create a directory with a name that included [seq]. The [seq] part should have been replaced with the sequence number (00001, 00002, etc.) but it wasn't. Instead, it was being interpreted literally, leading to the creation of a folder named [seq]-.... Then, it was trying to save the video files inside this directory, using the proper naming convention, but since the [seq] directory didn't exist, it resulted in the FileNotFoundError. The program was basically confused about where to save the videos, leading to a breakdown in the saving process. This issue highlights a problem in how SD.Next handles the creation of subdirectories and the proper sequencing of files within those directories. I know, it sounds a little techy, but in simple terms, it's just not putting the files where they should be!
My Setup: The Tech Specs
For those of you who like to know the nitty-gritty, here's the tech setup I was using when I ran into this problem. This information can be useful because it helps to identify if the issue is specific to a certain configuration or if it's a more general problem.
- Backend: I was using Diffusers. This is a crucial component because it handles a lot of the image and video processing behind the scenes. Different backends can behave differently, so knowing which one you're using can be super important when troubleshooting.
 - Compute: The heavy lifting was done by an nVidia CUDA setup. CUDA is what allows your system to use the graphics card for faster processing. Problems with CUDA can sometimes lead to unexpected behavior, so it's good to keep this in mind.
 - Interface: I was using the Standard interface, which is the typical user interface for SD.Next. This means I wasn't using any custom modifications or extensions that might have contributed to the issue.
 - Branch: The version I was using was from the Master branch. This means I was running the latest version, which usually implies that the issue is not necessarily due to an older version of the program. It also indicates that it's a problem present in the most recent updates.
 - Model: I was using StableDiffusion 1.5. The model you're using can sometimes affect how things work, so this detail helps to provide context. It could, in theory, impact how videos are saved.
 
This setup provides a complete picture of the environment where the problem occurred. It’s always useful to provide these details when reporting a bug or looking for solutions, as it helps other users and developers to understand the context and maybe replicate the issue.
The Solution: (Hopefully) A Bug Fix
So, after discussing this with vladmandic (massive thanks to him!), the plan is to get this sorted out with a proper bug fix. He suggested I report the issue, so here we are! The fix will likely involve correcting how SD.Next handles the directory creation and the sequence numbering, so that it correctly saves the videos to the intended subdirectory with the proper filenames.
While there isn't a workaround in place yet, the most important step is to report the problem so it can be fixed by the developers. Providing all the information about the issue, including the specific error message, the steps to reproduce it, and your system setup, is crucial for helping developers understand and fix the problem. By doing this, we're all contributing to making SD.Next better. If you encounter a similar problem, don't hesitate to report it as well. The more information the developers have, the faster they can find a solution.
Steps to Take If You Encounter This
If you're facing this issue, here's what you can do:
- Double-check your directory settings: Make sure you've correctly specified the output directory and that it is indeed what you intend.
 - Report the issue: Head over to the SD.Next repository, or wherever bug reports are handled, and detail the problem. Include the error message, your setup, and the steps to reproduce the error. Providing screenshots is always a bonus!
 - Stay updated: Keep an eye on the SD.Next updates. The fix will likely be rolled out in a future release. Subscribe to any channels where release notes are posted.
 - Try different backends or models: While waiting for the official fix, you could try using a different backend or model to see if it resolves the issue. This might help temporarily. Remember, these are just temporary measures until the official fix arrives.
 
Conclusion: Keeping the Video Workflow Smooth
This was a frustrating issue, but together, we'll get it sorted. Make sure you report your issues so that the developers can work on them. Thanks to the community for working together to get these issues resolved!