vislearn / ControlNet-XS

Apache License 2.0
411 stars 12 forks source link

Error in Colab #6

Closed vislupus closed 9 months ago

vislupus commented 9 months ago

Hi,

Thanks for the release of both the code and models.

I've tried to run the code on Google Colab, and I've got an error. Probably, I'm missing something, but in case it is an error. You can see the Colab.

Also, it looks like it needs too much VRAM for free Colab. Can you tell me if that is true?

Thanks

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-2-1b395f27c622>](https://localhost:8080/#) in <cell line: 1>()
----> 1 import scripts.control_utils as cu
      2 import torch
      3 from PIL import Image
      4 
      5 path_to_config = '/content/ControlNet-XS/configs/inference/sdxl/sdxl_encD_canny_48m.yaml'

13 frames
[/usr/local/lib/python3.10/dist-packages/numpy/testing/_private/utils.py](https://localhost:8080/#) in <module>
     55 IS_PYSTON = hasattr(sys, "pyston_version_info")
     56 HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None and not IS_PYSTON
---> 57 HAS_LAPACK64 = numpy.linalg._umath_linalg._ilp64
     58 
     59 _OLD_PROMOTION = lambda: np._get_promotion_state() == 'legacy'

AttributeError: module 'numpy.linalg._umath_linalg' has no attribute '_ilp64'
Sipirius commented 9 months ago

You seem to have a wrong numpy version. This does not happen wif everything is installed exactly as described in the readme.md. I am not sure about how Colab handles things.

Regarding the vram: this example code does not use additional performance tricks, so it requires the full model to be loaded and processed on the gpu at all times. So you might need more than 16gb vram to run the SDXL model.

cheers