这是indexloc提供的服务,不要输入任何密码
Skip to content

AttibuteError: 'NoneType' object has no attribute 'dtype' when I run demo with Mode 3 and 4 #49

@wendaogongyi

Description

@wendaogongyi

System Info / 系統信息

48G VRAM 64G RAM

Information / 问题信息

  • The official example scripts / 官方的示例脚本
  • My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程

In gradio_web_demo.py

text_encoder = None
transformer = None
if mode in ["1", "2"]:
    text_encoder = GlmModel.from_pretrained(model_path, subfolder="text_encoder", torch_dtype=dtype)
    transformer = CogView4Transformer2DModel.from_pretrained(model_path, subfolder="transformer", torch_dtype=dtype)
    quantize_(text_encoder, int8_weight_only())
    quantize_(transformer, int8_weight_only())

But Mode 3 and 4 is None

When I run the demo with Mode 3 or 4
AttibuteError: 'NoneType' object has no attribute 'dtype'

Expected behavior / 期待表现

Fix Mode3 and 4 demo

Metadata

Metadata

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