Runtime error and Module not found error

#4
by harishreddy09876543 - opened

/usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_auth.py:112: UserWarning:
The secret HF_TOKEN does not exist in your Colab secrets.
To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.
You will be able to reuse this secret in all of your notebooks.
Please note that authentication is recommended but still optional to access public models or datasets.
warnings.warn(
config.json: 100%
 3.47k/3.47k [00:00<00:00, 373kB/s]

RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.12/dist-packages/transformers/utils/import_utils.py in getattr(self, name)
2261 try:
-> 2262 module = self._get_module(self._class_to_module[name])
2263 value = getattr(module, name)

27 frames
RuntimeError: operator torchvision::nms does not exist

The above exception was the direct cause of the following exception:

ModuleNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.12/dist-packages/transformers/utils/import_utils.py in getattr(self, name)
2348 ) from e
2349 else:
-> 2350 raise ModuleNotFoundError(
2351 f"Could not import module '{name}'. Are this object's requirements defined correctly?"
2352 ) from e

ModuleNotFoundError: Could not import module 'Gemma4VisionConfig'. Are this object's requirements defined correctly?


NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.

%pip uninstall -y torch torchvision torchaudio
%pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
%pip install -U transformers accelerate

dssfdsfdsfdsffdsfdsf

Traceback (most recent call last):
File "/scratch/users/ntu/kimyong0/code/guide-language-diffusion/test-gemma.py", line 22, in
output = model.generate(**input_ids, max_new_tokens=512)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/users/ntu/kimyong0/scratch/.conda/envs/guide-language-diffusion/lib/python3.12/site-packages/torch/utils/_contextlib.py", line 120, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/users/ntu/kimyong0/scratch/.conda/envs/guide-language-diffusion/lib/python3.12/site-packages/transformers/models/diffusion_gemma/generation_diffusion_gemma.py", line 646, in generate
and (input_ids == self.config.image_token_id).any()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/users/ntu/kimyong0/scratch/.conda/envs/guide-language-diffusion/lib/python3.12/site-packages/torch/_meta_registrations.py", line 7457, in meta_local_scalar_dense
raise RuntimeError("Tensor.item() cannot be called on meta tensors")
RuntimeError: Tensor.item() cannot be called on meta tensors

Sign up or log in to comment