pals-ttic / sjc

Score Jacobian Chaining: Lifting Pretrained 2D Diffusion Models for 3D Generation (CVPR 2023)
https://pals.ttic.edu/p/score-jacobian-chaining
Other
500 stars 15 forks source link

Colab #1

Open LucasSilvaFerreira opened 1 year ago

LucasSilvaFerreira commented 1 year ago

Hi. Is it possible to run this code in the colab pro? Are you guys about to release some colab? Very nice work.

w-hc commented 1 year ago

We will. This uses < 9GB of GPU memory, and should be ok with regular colab.

dvschultz commented 1 year ago

I put one together here: https://colab.research.google.com/drive/1zixo66UYGl70VOPy053o7IV_YkQt5lCZ?usp=sharing

w-hc commented 1 year ago

wow thank you!

elloza commented 1 year ago

I put one together here: https://colab.research.google.com/drive/1zixo66UYGl70VOPy053o7IV_YkQt5lCZ?usp=sharing

is it working rigth now?

, line 34, in load_model_from_config pl_sd = torch.load(ckpt, map_location="cpu") File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 712, in load return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args) File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 1049, in _load result = unpickler.load() File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 1042, in find_class return super().find_class(mod_name, name) File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/init.py", line 20, in from pytorch_lightning import metrics # noqa: E402 File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/metrics/init.py", line 15, in from pytorch_lightning.metrics.classification import ( # noqa: F401 File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/metrics/classification/init.py", line 14, in from pytorch_lightning.metrics.classification.accuracy import Accuracy # noqa: F401 File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/metrics/classification/accuracy.py", line 18, in from pytorch_lightning.metrics.utils import deprecated_metrics, void File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/metrics/utils.py", line 29, in from pytorch_lightning.utilities import rank_zero_deprecation File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/utilities/init.py", line 18, in from pytorch_lightning.utilities.apply_func import move_data_to_device # noqa: F401 File "/usr/local/lib/python3.8/dist-packages/pytorch_lightning/utilities/apply_func.py", line 31, in from torchtext.legacy.data import Batch ModuleNotFoundError: No module named 'torchtext.legacy'

elloza commented 1 year ago

I think I found the issue:

TLDR; !pip install pytorch-lightning==1.8.3.post0

Ref: https://github.com/Stability-AI/stablediffusion/issues/8

Congratulations for the work by the way!

paracanthurus25 commented 1 year ago

I put one together here: https://colab.research.google.com/drive/1zixo66UYGl70VOPy053o7IV_YkQt5lCZ?usp=sharing

So I keep getting this error when I run the "Download Assets" cell:

tar: /content/sjc/release.tar: Cannot open: No such file or directory tar: Error is not recoverable: exiting now

If I try to run the next cell, "update env.json," then I get this error:

FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/sjc/env.json'

Any help would be greatly appreciated :)

LucasSilvaFerreira commented 1 year ago

I had this problems previously. https://colab.research.google.com/drive/1tg1ZmVNxrmPpi8CNO7Zu9OPcHbSnYXEs Try this version

On Tue, Dec 13, 2022, 7:07 PM paracanthurus25 @.***> wrote:

I put one together here: https://colab.research.google.com/drive/1zixo66UYGl70VOPy053o7IV_YkQt5lCZ?usp=sharing

So I keep getting this error when I run the "Download Assets" cell:

tar: /content/sjc/release.tar: Cannot open: No such file or directory tar: Error is not recoverable: exiting now

If I try to run the next cell, "update env.json," then I get this error:

FileNotFoundError: [Errno 2] No such file or directory: '/content/drive/MyDrive/sjc/env.json'

Any help would be greatly appreciated :)

— Reply to this email directly, view it on GitHub https://github.com/pals-ttic/sjc/issues/1#issuecomment-1350122792, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABL2CGKOJ7QRGZZAP2IZH2LWNEFTHANCNFSM6AAAAAASRN4ZXU . You are receiving this because you authored the thread.Message ID: @.***>

LucasSilvaFerreira commented 1 year ago

I tried it using my notebook. But the final version 3d model is pretty pixelated. I don't know if this colab is taking advantage of the unpixelated improvement. @w-hc

paracanthurus25 commented 1 year ago

Thanks. It still gives the error in the "Download Assets" cell, but it allows me to run the other cells. In the second cell under "Run Experiments," it gives me this error:

FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/MyDrive/sjc/release/diffusion_ckpts/stable_diffusion/sd-v1-5.ckpt.

I looked in my Google Drive and I couldn't find the release directory.

LucasSilvaFerreira commented 1 year ago

It seems that you are mounting the drive with another name ('gdrive' or 'drive'). Make sure the drive you mounted has the same name of the required directories.

LucasSilvaFerreira commented 1 year ago

Check if the current version is saving the SD model in this in same directory. Maybe they changed and I'm using the old directory reference

w-hc commented 1 year ago

@LucasSilvaFerreira no the colab is not using the subpix rendering. we will update the colab.

paracanthurus25 commented 1 year ago

So I actually got the original colab to work all the way until the second cell under the "run experiments" module, where it gives me this error:

ModuleNotFoundError: No module named 'taming'