Skip to content

当前项目 requirements.txt 的依赖声明无法运行模型,希望能尽快更新依赖说明 #220

@ra1n666k

Description

@ra1n666k

当前项目 requirements.txt 的依赖声明 未涵盖 PyTorch 版本要求,请尽快更新,导致在我安装2.0.1的pytorch依赖后
python demo/app_januspro.py

运行时报错了,

Disabling PyTorch because PyTorch >= 2.1 is required but found 2.0.1+cu117
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
Python version is above 3.10, patching the collections module.
None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
C:\Users\18051.conda\envs\gradio\lib\site-packages\torchvision\datapoints_init_.py:12: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: pytorch/vision#6753, and you can also check out pytorch/vision#7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
warnings.warn(BETA_TRANSFORMS_WARNING)
C:\Users\18051.conda\envs\gradio\lib\site-packages\torchvision\transforms\v2_init
.py:54: UserWarning: The torchvision.datapoints and torchvision.transforms.v2 namespaces are still Beta. While we do not expect major breaking changes, some APIs may still change according to user feedback. Please submit any feedback you may have in this issue: pytorch/vision#6753, and you can also check out pytorch/vision#7319 to learn more about the APIs that we suspect might involve future changes. You can silence this warning by calling torchvision.disable_beta_transforms_warning().
warnings.warn(BETA_TRANSFORMS_WARNING)
C:\Users\18051.conda\envs\gradio\lib\site-packages\transformers\models\auto\image_processing_auto.py:609: FutureWarning: The image_processor_class argument is deprecated and will be removed in v4.42. Please use slow_image_processor_class, or fast_image_processor_class instead
warnings.warn(
Traceback (most recent call last):
File "E:\Models\Janus\demo\app_januspro.py", line 4, in
from janus.models import MultiModalityCausalLM, VLChatProcessor
File "E:\Models\Janus\janus\models_init
.py", line 21, in
from .modeling_vlm import MultiModalityCausalLM
File "E:\Models\Janus\janus\models\modeling_vlm.py", line 272, in
AutoModelForCausalLM.register(MultiModalityConfig, MultiModalityCausalLM)
File "C:\Users\18051.conda\envs\gradio\lib\site-packages\transformers\utils\import_utils.py", line 1885, in getattribute
requires_backends(cls, cls._backends)
File "C:\Users\18051.conda\envs\gradio\lib\site-packages\transformers\utils\import_utils.py", line 1871, in requires_backends
raise ImportError("".join(failed))
ImportError:
AutoModelForCausalLM requires the PyTorch library but it was not found in your environment. Checkout the instructions on the
installation page: https://pytorch.org/get-started/locally/ and follow the ones that match your environment.
Please note that you may need to restart your runtime after installation.

另外还希望附上python的版本要求,3.11/3.12下部分轮子无法原生支持,如sentencepiece,需用python=3.10的环境

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions