Stability-AI / stable-fast-3d

SF3D: Stable Fast 3D Mesh Reconstruction with UV-unwrapping and Illumination Disentanglement
https://stable-fast-3d.github.io
Other
1.2k stars 131 forks source link

Spaces in directory names cause FileNotFoundError #16

Closed DrCyanide closed 2 months ago

DrCyanide commented 3 months ago

I've cloned the repo to D:\Documents\AI\2D to 3D\stable-fast-3d, and I get this error.

Traceback (most recent call last):
  File "D:\Documents\AI\2D to 3D\stable-fast-3d\gradio_app.py", line 43, in <module>
    model = SF3D.from_pretrained(
  File "D:\Documents\AI\2D to 3D\stable-fast-3d\sf3d\system.py", line 89, in from_pretrained
    model = cls(cfg)
  File "D:\Documents\AI\2D to 3D\stable-fast-3d\sf3d\models\utils.py", line 29, in __init__
    self.configure(*args, **kwargs)
  File "D:\Documents\AI\2D to 3D\stable-fast-3d\sf3d\system.py", line 139, in configure
    self.baker = TextureBaker()
  File "D:\Documents\AI\2D to 3D\stable-fast-3d\sf3d\texture_baker.py", line 13, in __init__
    self.baker = slangtorch.loadModule(
  File "C:\Users\Travis\AppData\Roaming\Python\Python310\site-packages\slangtorch\slangtorch.py", line 617, in loadModule
    rawModule = _loadModule(fileName, moduleName, buildDir, options, sourceDir=outputFolder, verbose=verbose, includePaths=includePaths, dryRun=False)
  File "C:\Users\Travis\AppData\Roaming\Python\Python310\site-packages\slangtorch\slangtorch.py", line 522, in _loadModule
    resultCpp, metadataCpp = compileSlang(metadata.get("cpp", None), fileName, "torch-binding", options, cppOutName, verbose, includePaths=includePaths, dryRun=dryRun)
  File "C:\Users\Travis\AppData\Roaming\Python\Python310\site-packages\slangtorch\slangtorch.py", line 280, in compileSlang
    return True, (_compileSlang(metadata, fileName, targetMode, options, outputFile, includePaths, verbose) if not dryRun else None)
  File "C:\Users\Travis\AppData\Roaming\Python\Python310\site-packages\slangtorch\slangtorch.py", line 311, in _compileSlang
    deps = parseDepfile(depFile)
  File "C:\Users\Travis\AppData\Roaming\Python\Python310\site-packages\slangtorch\slangtorch.py", line 491, in parseDepfile
    depFilesWithTimestamps = [
  File "C:\Users\Travis\AppData\Roaming\Python\Python310\site-packages\slangtorch\slangtorch.py", line 492, in <listcomp>
    (depFile, os.path.getmtime(depFile)) for depFile in depFiles]
  File "C:\Program Files\Python310\lib\genericpath.py", line 55, in getmtime
    return os.stat(filename).st_mtime
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'D:\\Documents\\AI\\2D'

Note that 2D to 3D got truncated to 2D in the error message. If I run the Python code genericpath.getmtime(r'D:\Documents\AI\2D to 3D\stable-fast-3d') I get a valid response.

jammm commented 3 months ago

Sounds like a slangtorch specific issue unfortunately. We're trying to get rid of it as a dependency. Stay tuned!

vork commented 3 months ago

We recently replaced the baker with a custom CUDA/CPP one. Please test again.