Comments (16)
from paddlemix.
主要报错信息:InvalidArgumentError: Failed to parse program_desc from binary string.
[Hint: Expected desc_.ParseFromString(binary_str) == true, but received desc_.ParseFromString(binary_str):0 != true:1.] (at /paddle/paddle/fluid/framework/program_desc.cc:103)
from paddlemix.
提供一下最小复现代码
from paddlemix.
提供一下最小复现代码
就在这个引擎初始化的函数里面报错的:
`
bool PaddleInferenceEngine::Init(const InferenceConfig& infer_config)
{
const PaddleEngineConfig& engine_config = *(infer_config.paddle_config);
paddle_infer::Config config;
config.SetModel(engine_config.model_filename,
engine_config.params_filename);
// 使用cpu推理时可以使用mkl进行加速
if (engine_config.use_mkl && !engine_config.use_gpu)
{
config.EnableMKLDNN();
config.SetMkldnnCacheCapacity(10);
}
config.SetCpuMathLibraryNumThreads(engine_config.mkl_thread_num);
if (engine_config.use_gpu)
{
config.EnableUseGpu(100, engine_config.gpu_id);
}
else
{
config.DisableGpu();
}
config.SwitchUseFeedFetchOps(false);
config.SwitchSpecifyInputNames(true);
config.SwitchIrOptim(engine_config.use_ir_optim);
config.EnableMemoryOptim();
config.DisableGlogInfo();
if (engine_config.use_trt && engine_config.use_gpu)
{
paddle_infer::PrecisionType precision;
if (engine_config.precision == 0)
{
precision = paddle_infer::PrecisionType::kFloat32;
}
else if (engine_config.precision == 1)
{
precision = paddle_infer::PrecisionType::kHalf;
}
else if (engine_config.precision == 2)
{
precision = paddle_infer::PrecisionType::kInt8;
}
else
{
std::cerr << "Can not support the set precision" << std::endl;
return false;
}
config.EnableTensorRtEngine(
engine_config.max_workspace_size, /* workspace_size*/
engine_config.max_batch_size, /* max_batch_size*/
engine_config.min_subgraph_size, /* min_subgraph_size*/
precision, /* precision*/
engine_config.use_static, /* use_static*/
engine_config.use_calib_mode); /* use_calib_mode*/
if (engine_config.min_input_shape.size() != 0) {
config.SetTRTDynamicShapeInfo(engine_config.min_input_shape,
engine_config.max_input_shape,
engine_config.optim_input_shape);
}
}
HLOG_INFO_Analyzer("begin to create paddle infference Predictor.");
predictor_ = std::move(paddle_infer::CreatePredictor(config));
HLOG_INFO_Analyzer("end of create paddle infference Predictor.");
return true;
}
`
from paddlemix.
使用CPU推理还是GPU推理报错的呢?
from paddlemix.
使用CPU推理还是GPU推理报错的呢?
你好,我CPU和GPU都试过,根本还没到推理,就初始化预测引擎的时候就报错了,报错就发生在我上面发的这个初始化函数里
from paddlemix.
使用CPU推理还是GPU推理报错的呢?
你好,我CPU和GPU都试过,根本还没到推理,就初始化预测引擎的时候就报错了,报错就发生在我上面发的这个初始化函数里
先加上这句话试试呢config.SwitchIrOptim(false);
from paddlemix.
使用CPU推理还是GPU推理报错的呢?
你好,我CPU和GPU都试过,根本还没到推理,就初始化预测引擎的时候就报错了,报错就发生在我上面发的这个初始化函数里
先加上这句话试试呢config.SwitchIrOptim(false);
刚刚试过了,不行,还是一样的错误。我导出的这个模型中,好像是需要重新编译C++扩展,会不会是模型中有一些模块无法被paddle_inference解析呢?
from paddlemix.
使用CPU推理还是GPU推理报错的呢?
你好,我CPU和GPU都试过,根本还没到推理,就初始化预测引擎的时候就报错了,报错就发生在我上面发的这个初始化函数里
先加上这句话试试呢config.SwitchIrOptim(false);
刚刚试过了,不行,还是一样的错误。我导出的这个模型中,好像是需要重新编译C++扩展,会不会是模型中有一些模块无法被paddle_inference解析呢?
试试python能推理吗?
from paddlemix.
使用CPU推理还是GPU推理报错的呢?
你好,我CPU和GPU都试过,根本还没到推理,就初始化预测引擎的时候就报错了,报错就发生在我上面发的这个初始化函数里
先加上这句话试试呢config.SwitchIrOptim(false);
刚刚试过了,不行,还是一样的错误。我导出的这个模型中,好像是需要重新编译C++扩展,会不会是模型中有一些模块无法被paddle_inference解析呢?
试试python能推理吗?
from paddlemix.
C++的话,应该要编译自定义算子呢
from paddlemix.
C++的话,应该要编译自定义算子呢
就是说要把新加的算子,编译到paddle_inference.so中,才能实现推理是不?如果是的话,请问有相关的指导文档嘛?
from paddlemix.
可以试试去掉deformable_detr_ops这个算子,排除这个自定义算子带来的影响。具体:
1.如果环境里面安装了deformable_detr_ops,可以先pip uninstall 删掉;
2.去除后,重新导出,试试python能不能正常跑;
3.如果python正常,再试试c++
from paddlemix.
可以试试去掉deformable_detr_ops这个算子,排除这个自定义算子带来的影响。具体: 1.如果环境里面安装了deformable_detr_ops,可以先pip uninstall 删掉; 2.去除后,重新导出,试试python能不能正常跑; 3.如果python正常,再试试c++
hello,我试过了,还是不行。请问您那边有在C++推理成功推理过不?
from paddlemix.
可以试试去掉deformable_detr_ops这个算子,排除这个自定义算子带来的影响。具体: 1.如果环境里面安装了deformable_detr_ops,可以先pip uninstall 删掉; 2.去除后,重新导出,试试python能不能正常跑; 3.如果python正常,再试试c++
请问,你们内部有成功过的例子不?还是说正在兼容当中啊
from paddlemix.
可以试试去掉deformable_detr_ops这个算子,排除这个自定义算子带来的影响。具体: 1.如果环境里面安装了deformable_detr_ops,可以先pip uninstall 删掉; 2.去除后,重新导出,试试python能不能正常跑; 3.如果python正常,再试试c++
请问,你们内部有成功过的例子不?还是说正在兼容当中啊
这个模型暂没做过c++推理,可以参考https://github.com/PaddlePaddle/Paddle-Inference-Demo/tree/master 里面的其他模型demo;若报错,可在这里面提issue https://github.com/PaddlePaddle/Paddle-Inference-Demo/issues?q=is%3Aopen+is%3Aissue
from paddlemix.
Related Issues (20)
- SDXL-turbo训练 HOT 1
- 🎁PaddleMIX 快乐开源活动表单 HOT 11
- 新增模型Hotshot-XL HOT 11
- 新增模型VideoCrafter
- Stable Diffusion XL Long Weighted Prompt Pipeline
- 新增模型GPT-SoVITS HOT 1
- sora HOT 1
- ppdiffusers 是和diffusers的社区接口保持同步的吗? HOT 1
- inpaint是否能使用lora HOT 1
- ToME + ControlNet is supported and how much is the speed ratio? HOT 1
- 请问如何加载civitai上的 SDXL 模型?谢谢 HOT 3
- Text video synchronization
- Export json automatic_labeling
- StableDiffusionXLControlNetPipeline如何加载本地权重? HOT 1
- Automatic labeling for video HOT 2
- wav2lip用自己的数据集训练!4090训练了两天,生成的视频和原视频一样,嘴型没有任何变化!
- open-sora 推理复现 HOT 2
- 没有ChatTemplateMixin这个包呀 HOT 1
- Readme中的艺术化二维码,有没有python脚本的实现 HOT 1
- 文件不存在,下载地址变了吗?./unet_config.json/config.json does not exist.! HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paddlemix.