当前位置: 首页 > news >正文

linux做网站配置小程序加盟代理平台

linux做网站配置,小程序加盟代理平台,东莞住建局电话是多少,怎么做自动下单网站目录 生成视频代码#xff1a; 维度报错#xff1a; 解决方法#xff0c;修改代码#xff1a; 已开源#xff1a; 视频生成模型 Zeroscope开源 免费无水印 视频生成模型 Zeroscope_v2_576w 开源 - 腾讯云开发者社区-腾讯云 生成视频代码#xff1a; import torch fro…目录 生成视频代码 维度报错 解决方法修改代码 已开源 视频生成模型 Zeroscope开源 免费无水印 视频生成模型 Zeroscope_v2_576w 开源 - 腾讯云开发者社区-腾讯云 生成视频代码 import torch from diffusers import DiffusionPipeline, DPMSolverMultistepScheduler from diffusers.utils import export_to_video import os # os.environ[HTTP_PROXY] http://127.0.0.1:7890os.environ[HF_TOKEN] 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 # os.environ[HTTPS_PROXY] https://127.0.0.1:7890# pipe DiffusionPipeline.from_pretrained(rD:\360安全浏览器下载, torch_dtypetorch.float16) pipe DiffusionPipeline.from_pretrained(cerspense/zeroscope_v2_576w, torch_dtypetorch.float16,use_auth_tokenos.environ[HF_TOKEN]) pipe.scheduler DPMSolverMultistepScheduler.from_config(pipe.scheduler.config) pipe.enable_model_cpu_offload()prompt Darth Vader is surfing on waves video_frames pipe(prompt, num_inference_steps40, height320, width576, num_frames24).frames video_path export_to_video(video_frames) print(video_path)维度报错 Traceback (most recent call last):File E:\project\jijia\aaa.py, line 18, in modulevideo_path export_to_video(video_frames)File D:\ProgramData\miniconda3\envs\pysd\lib\site-packages\diffusers\utils\export_utils.py, line 135, in export_to_videoh, w, c video_frames[0].shape ValueError: too many values to unpack (expected 3) 解决方法修改代码 def export_to_video(video_frames: Union[List[np.ndarray], List[PIL.Image.Image]], output_video_path: str None, fps: int 10 ) - str:if is_opencv_available():import cv2else:raise ImportError(BACKENDS_MAPPING[opencv][1].format(export_to_video))if output_video_path is None:output_video_path tempfile.NamedTemporaryFile(suffix.mp4).name# Convert PIL images to numpy arrays if neededif isinstance(video_frames[0], PIL.Image.Image):video_frames [np.array(frame) for frame in video_frames]# Ensure the frames are in the correct formatif isinstance(video_frames[0], np.ndarray):# Check if frames are 4-dimensional and handle accordinglyif len(video_frames[0].shape) 4:video_frames [frame[0] for frame in video_frames]# Convert frames to uint8video_frames [(frame * 255).astype(np.uint8) for frame in video_frames]# Ensure all frames are in (height, width, channels) formath, w, c video_frames[0].shapefourcc cv2.VideoWriter_fourcc(*mp4v)video_writer cv2.VideoWriter(output_video_path, fourcc, fpsfps, frameSize(w, h))for frame in video_frames:img cv2.cvtColor(frame, cv2.COLOR_RGB2BGR)video_writer.write(img)video_writer.release()return output_video_pathdef export_to_video_o(video_frames: Union[List[np.ndarray], List[PIL.Image.Image]], output_video_path: str None, fps: int 10 ) - str:if is_opencv_available():import cv2else:raise ImportError(BACKENDS_MAPPING[opencv][1].format(export_to_video))if output_video_path is None:output_video_path tempfile.NamedTemporaryFile(suffix.mp4).nameif isinstance(video_frames[0], np.ndarray):video_frames [(frame * 255).astype(np.uint8) for frame in video_frames]elif isinstance(video_frames[0], PIL.Image.Image):video_frames [np.array(frame) for frame in video_frames]fourcc cv2.VideoWriter_fourcc(*mp4v)h, w, c video_frames[0].shapevideo_writer cv2.VideoWriter(output_video_path, fourcc, fpsfps, frameSize(w, h))for i in range(len(video_frames)):img cv2.cvtColor(video_frames[i], cv2.COLOR_RGB2BGR)video_writer.write(img)return output_video_path
http://www.tj-hxxt.cn/news/228679.html

相关文章:

  • 在演示文稿上网站怎么做淘宝客网站模块
  • 辽宁省网站备案系统小说网站开发思路
  • 电影网站盗链怎么做南昌模板建站定制
  • 深圳哪些设计公司做网站比较出名国内做网站的企业
  • 公司网站 建设福州网站搜索引擎优化
  • 网站创建教程自助建手机网站免费
  • 咸宁网站制作培训去香洲会变黄码吗
  • 楼盘价格哪个网站做的好嘉定网站建设电脑培训
  • 深圳网站设计师天津在哪做网站
  • 公司网站建设苏州劳伦wordpress如何双语
  • 老外做的汉语网站discuz论坛系统
  • 网站转移服务器需要重新备案吗山东省建设管理中心网站首页
  • 如何给网站做证书wordpress term id
  • 网站设计制作哪个公司的好网页小游戏代码
  • 莆田建设项目环境网站各大网站网址目录
  • 建设银行网站用户名是什么竞价托管 微竞价
  • 后台网站模板下载网页版梦幻西游五色石
  • 设计师接私活的兼职平台网络营销优化培训
  • 厦门app网站建设网站建设的er图
  • 网站建设评审标准wordpress目录浏览漏洞
  • 网站建设广告wordpress 总访问量
  • 网站推广自己可以做吗做h5小程序的网站
  • 网站基础功能google网页版入口
  • 网站生成公司品牌推广公司
  • 服务器上配置网站海南seo顾问服务
  • 关于网站建设方案怎样开公司
  • 厦门专业的网站建设中国香烟网上商城
  • 漕泾网站建设基于cms设计网站的背景意义
  • 临沂外贸网站建设代做毕业设计找哪个网站
  • 建筑八大员证报考网站网站浏览历史怎么查看