Stability-AI / stable-fast-3d

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

Compile Error #7

Closed SunzeY closed 2 weeks ago

SunzeY commented 1 month ago
Traceback (most recent call last):
  File "/mnt/hwfile/mllm/sunzeyi/stable-fast-3d/run.py", line 66, in <module>
    model = SF3D.from_pretrained(
  File "/mnt/hwfile/mllm/sunzeyi/stable-fast-3d/sf3d/system.py", line 89, in from_pretrained
    model = cls(cfg)
  File "/mnt/hwfile/mllm/sunzeyi/stable-fast-3d/sf3d/models/utils.py", line 29, in __init__
    self.configure(*args, **kwargs)
  File "/mnt/hwfile/mllm/sunzeyi/stable-fast-3d/sf3d/system.py", line 139, in configure
    self.baker = TextureBaker()
  File "/mnt/hwfile/mllm/sunzeyi/stable-fast-3d/sf3d/texture_baker.py", line 13, in __init__
    self.baker = slangtorch.loadModule(
  File "/mnt/petrelfs/sunzeyi/miniconda3/envs/fast3d/lib/python3.10/site-packages/slangtorch/slangtorch.py", line 617, in loadModule
    rawModule = _loadModule(fileName, moduleName, buildDir, options, sourceDir=outputFolder, verbose=verbose, includePaths=includePaths, dryRun=False)
  File "/mnt/petrelfs/sunzeyi/miniconda3/envs/fast3d/lib/python3.10/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 "/mnt/petrelfs/sunzeyi/miniconda3/envs/fast3d/lib/python3.10/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 "/mnt/petrelfs/sunzeyi/miniconda3/envs/fast3d/lib/python3.10/site-packages/slangtorch/slangtorch.py", line 309, in _compileSlang
    raise RuntimeError(f"Compilation failed with error {result.returncode}")
RuntimeError: Compilation failed with error 1
dhruvmsheth commented 1 month ago

having similar error. Are there alternatives to slangtorch considering the fact that it is relatively new and not yet developed for all systems well?

vork commented 1 month ago

I'm looking into alternatives (They might run a bit slower). I will update here.

dhruvmsheth commented 1 month ago

Thanks @vork, really appreciate your help!

jammm commented 1 month ago

@SunzeY can you share the full error logs? There might be some logs above this traceback. if not, try adding verbose=True to https://github.com/Stability-AI/stable-fast-3d/blob/main/sf3d/texture_baker.py#L14 then share the updated logs here.

@dhruvmsheth can you do the same? Also, what's your environment? Windows/Linux? and did you install CUDA?

SunzeY commented 1 month ago

@jammm It's missing GLIBC_2.29 as I'm using Centos, I have solved it with apptainer, but it hinders the easy usage... waiting for the same solution as @dhruvmsheth asked.

dhruvmsheth commented 1 month ago

@jammm I'm trying to get it work on Jetson AGX Orin which is an Arm 64 board and since slangtorch is new, it doesn't have binary support for the architecture. I was looking into building it from source using the build-package.sh script but that doesn't work for my architecture too. I'm happy to submit a PR on another branch for arm64 if there's an alternative to slangtorch can be used for sf3d or if slangtorch can be built on Arm64. Also, I have CUDA on the system. Thanks!

dhruvmsheth commented 1 month ago

I got this running on Jetson AGX Orin jetpack 6.0 after building slang from source and using the built binaries with slang-torch. Thanks for the great work! I'll add a bash file and instructions to a fork and submit a PR on a new branch if that's something that the repo wants to add.

jammm commented 1 month ago

@dhruvmsheth glad to hear that it works for you! We're actually working on getting rid of the slang dependency altogether and going straight CUDA. Hopefully it'll be up this weekend or by Monday.

dhruvmsheth commented 1 month ago

That sounds great! Thanks!

vork commented 2 weeks ago

We finally pushed the new baker. This should now work better.