Skip to content

Monodream model infer #58

@skkkss

Description

@skkkss

您好,感谢开源 MonoDream。
我正在尝试加载 MonoDream 预训练模型进行推理,但遇到了一系列问题。在已开源的代码中使用InferencePipelineMixin.load(args.model_path) 来加载模型,但实际使用时报错:

TypeError: Can't instantiate abstract class InferencePipelineMixin with abstract method __call__

我想这应该是因为 InferencePipelineMixin 是抽象类,而 load 方法尝试实例化它,违反了抽象类规则。
因此想请教一下正确的加载方式。我还尝试过使用使用 InferencePipeline.load(args.model_path),但是报错 FileNotFoundError: Meta file meta.json does not exist。官方发布的模型权重是否应该包含 meta.json 文件?是否是忘记上传了?

此外,我也尝试了 InferencePipelineMixin.load_pipeline(args.model_path, load_weights=False) 配合 MonoDream.load_model(args.model_path, use_decrete=True) 的方式,模型可以加载,但推理时出现多种错误(包括但不限于 process_image() got an unexpected keyword argument 'enable_dynamic_res''LlavaLlamaModel' object has no attribute 'model' 等兼容性问题)。

如果以上方式都不是正确的加载方法,能否提供正确的加载示例代码?

期待您的回复,谢谢!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions