You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Video Killed The Radio Star Colab生成AI音乐视频时遇TypeError报错求助

Colab生成AI音乐视频变体时的TypeError解决方法

问题说明

使用指定Colab项目制作AI音乐视频,初始图像生成正常,但运行变体生成单元格时触发以下错误:

Fetching variations
1
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-24-12a2c8f0bffb> in <module>
    153         tot_variations -= curr_variation_count  # only generate variations we still need
    154         for _ in range(tot_variations):
--> 155             img = get_variations_w_init(prompt, init_image, start_schedule=(1-image_consistency))[0]
    156             save_frame(
    157                 img,

3 frames
/usr/local/lib/python3.8/dist-packages/torch/autograd/grad_mode.py in decorate_context(*args, **kwargs)
     25         def decorate_context(*args, **kwargs):
     26             with self.clone():
--> 27                 return func(*args, **kwargs)
     28         return cast(F, decorate_context)
     29 

TypeError: __call__() missing 1 required positional argument: 'image'

非程序员可操作的解决步骤

  • 重启Colab运行时:点击顶部菜单栏「运行时」→「重启运行时」,之后从头依次运行所有单元格。多数依赖加载异常或版本冲突的问题能通过这个操作解决。
  • 检查图像一致性参数:确认image_consistency的取值在0到1之间,不要输入超出这个范围的数值。
  • 恢复默认配置:如果之前修改过代码里的参数,改回项目原始默认值,避免参数不匹配导致函数调用出错。
  • 重新打开项目:关闭当前Colab页面,重新打开项目链接,从头运行,排除临时缓存干扰。

内容的提问来源于stack exchange,提问作者sol daemon

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.07 14:50:29