Skip to content

我在代码中设置了device="gpu:3"但他仍会跑到我的gpu0上去 #15882

Open
@Rooike111

Description

@Rooike111

🔎 Search before asking

  • I have searched the PaddleOCR Docs and found no similar bug report.
  • I have searched the PaddleOCR Issues and found no similar bug report.
  • I have searched the PaddleOCR Discussions and found no similar bug report.

🐛 Bug (问题描述)

Image

Image
这个问题我不太理解

🏃‍♂️ Environment (运行环境)

linux 服务器

Image

🌰 Minimal Reproducible Example (最小可复现问题的Demo)

def init_model():
"""
初始化PPStructure模型。只在应用启动时调用一次。
"""
global pipeline
with model_lock:
if pipeline is None:
try:
# 修正类名和参数
pipeline = PPStructureV3(
use_doc_orientation_classify=True, # 使用文档方向分类
use_doc_unwarping=True, # 使用文档反畸变,
device="gpu:3"
)
logging.info("PPStructure model initialized successfully")
except Exception as e:
logging.error(f"Failed to initialize PPStructure model: {e}")
raise e
return pipeline

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