ashawkey / stable-dreamfusion

Text-to-3D & Image-to-3D & Mesh Exportation with NeRF + Diffusion.
Apache License 2.0
8.2k stars 721 forks source link

NEWB help for install #15

Open Duemellon opened 1 year ago

Duemellon commented 1 year ago

On my E: root: git clone https://github.com/ashawkey/stable-dreamfusion.git

Edited TOKEN, just a text file, no extension, with my token number in it

Then ran: python main.py --text "a hamburger" --workspace trial -O

Got: Traceback (most recent call last): File "E:\stable-dreamfusion\main.py", line 4, in from nerf.provider import NeRFDataset File "E:\stable-dreamfusion\nerf\provider.py", line 2, in import cv2 ModuleNotFoundError: No module named 'cv2'

Is this a PATH issue or am I missing some file or??

ashawkey commented 1 year ago

@Duemellon Hi, please check the readme carefully, you should install dependencies and build extensions before start training. Also, you can check the colab for a working example.

Duemellon commented 1 year ago

I've read the Readme a few times but not familiar with what all is going on. The above list were the things that i did.

I see it talking about the CKPT, which I already have a copy of for my Stable-Diffusion but IDK where I should put it.

  1. INSTALL WITH PIP is redundant to the git clone, right? Do one or the other, not both. Correct?

  2. Build Extension -- is optional, right? IDK what "extensions" would do for this either.

  3. The next thing I did was python main.py --text "a hamburger" --workspace trial -O which is where I got the error I put up above.

I'm sure this is intuitive for those who are quite familiar with this stuff but what did I miss? or what am I not understanding? Thanks.

ashawkey commented 1 year ago

Both 1 and 2 are NO... please follow this step by step: https://colab.research.google.com/drive/1MXT3yfOFvO0ooKEfiUUvTKwUkrrlCHpF?usp=sharing

(Except the huggingface log-in part, which you only need to create the TOKEN file)

Duemellon commented 1 year ago

Thank you for that direction on going to the collab. I only recently found out Collabs can be copied & ran locally but someone told me that can be done -- unfortunately didn't explain how.

Here's what I'll try: Copy the exact lines of code from that collab into my Anaconda (skipping the prefix !)

pip install -r requirements.txt >> no errors I could identify pip install git+https://github.com/NVlabs/nvdiffrast/ >> no errors identified

Skipped hugginface since I made the TXT file TOKEN (with no .txt extension)

Now at the "training & testing" section. I don't see any code to run? So I tried: python main.py --text "a hamburger" --workspace trial -O

but got messages about no _CUDA, no raymarching Could not locate a supported Microsoft Visual C++ installation

Thank you for your help so far. Was this the right approach to copy & run the code that's in the Collab? I want to run this locally.

philipkd commented 1 year ago

@Duemellon As a former first-timer, I recommend working with the Colab. It's about 10x easier to set up than setting up your environment.

Duemellon commented 1 year ago

Thanks for the encouragement in that direction.

I am a bit concerned about things being taken down, shut down, DOS'd, etc. since this popularity is exploding currently & there are people (creators) who are trying to protect their industries so I wanted to get local versions as soon as possible WHILE ALSO building up my skillset to better understand it. I'm not a complete stranger to this kinda stuff but my knowledge is 20 years old which creates a lag in translation. I might stick with the collab for a bit but I really want to figure out how to use these locally. It unlocks a lot of other things too.

philipkd commented 1 year ago

@Duemellon Understood! FYI, in Colab you can copy the .ipynb to your Google Drive folder, and it's your "local" copy. If the original Colab notebook gets taken down, you'll always have that. Just go to "File > Save a copy in Drive"

Duemellon commented 1 year ago

I've saved a CKPT to the Google Drive & some other items, but haven't figured out how to get them down to my computer.