ImportError: cannot import name ‘soft_relu‘ from ‘paddle.fluid.layers.nn‘

bash 复制代码
744e3db991ca:$ python run_virtual_human_server.py 
Traceback (most recent call last):
  File "run_virtual_human_server.py", line 14, in <module>
    from AI_Utils import AI
  File "AI_Utils.py", line 18, in <module>
    from AI_modules.first_order_motion.module import FirstOrderMotion
  File "AI_modules/first_order_motion/module.py", line 18, in <module>
    from .model import FirstOrderPredictor
  File "AI_modules/first_order_motion/model.py", line 28, in <module>
    from ppgan.models.generators.occlusion_aware import OcclusionAwareGenerator
  File "lib/python3.9/site-packages/ppgan/models/__init__.py", line 29, in <module>
    from .starganv2_model import StarGANv2Model
  File ".....lib/python3.9/site-packages/ppgan/models/starganv2_model.py", line 5, in <module>
    from paddle.fluid.layers.nn import soft_relu
ImportError: cannot import name 'soft_relu' from 'paddle.fluid.layers.nn' (.....lib/python3.9/site-packages/paddle/fluid/layers/nn.py)

解决方案,仅限wav2lip

bash 复制代码
vim ......ppgan/models/starganv2_model.py
注释掉 # from paddle.fluid.layers.nn import soft_relu
相关推荐
小姜前线技术1 小时前
AI流式渲染打字机效果抖动?节流方案踩坑实录
人工智能
用户018349301691 小时前
AI对话状态管理:useReducer还是XState
人工智能
先锋部队1 小时前
给AI对话加「停止生成」按钮:abort SSE实战
人工智能
新新技术迷1 小时前
移动端H5接AI对话的坑:键盘顶起与滚动到底
人工智能
aqi004 小时前
15天学会AI应用开发(七)有了大模型为什么还要引入RAG
人工智能·python·大模型·ai编程·ai应用
用户5191495848455 小时前
libcurl Headers API 释放后重利用漏洞:跨请求复用头句柄导致堆内存安全风险
人工智能·aigc
踩蚂蚁5 小时前
自定义语音唤醒词:从训练到部署的完整链路实践
人工智能
用户5191495848455 小时前
CVE-2025-1094 PostgreSQL SQL注入与WebSocket劫持远程代码执行利用工具
人工智能·aigc
IT_陈寒6 小时前
SpringBoot自动配置这个坑,我踩进去又爬出来了
前端·人工智能·后端