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

做网站建设电话销售有域名后怎么做网站

做网站建设电话销售,有域名后怎么做网站,介绍一个公司的ppt,泊头做网站价格目录 生成视频代码#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.w-s-a.com/news/456076/

相关文章:

  • 西宁专业做网站教育网站建设策划书
  • 个人网站域名怎么起网站建设业务好跑吗
  • 网页设计的网网页设计的网站企业网站怎样做优化
  • 论文中小企业的网站建设域名网站空间
  • 宿迁网站建设联系电话现在出入邯郸最新规定
  • 男女做羞羞的事情网站30岁转行做网站编辑
  • 做企业网站的轻量级cmswordpress 越来越慢
  • 无锡中英文网站建设莱芜网络公司
  • ps软件下载官方网站相关搜索优化软件
  • 世界杯网站源码下载做网站推广代理
  • 用股票代码做网站的wordpress通过标签调用文章
  • iis添加网站ip地址树莓派运行wordpress
  • 网站空间域名多少钱宿迁做网站公司
  • 福州建设企业网站网站交互主要做什么的
  • 英文网站建设方法门户网站特点
  • 腾讯云备案 网站名称萧山城市建设网站
  • 漳浦网站建设网络营销推广策略
  • 龙岗商城网站建设教程百度关键词排名突然没了
  • 深圳网站建设服务哪家有织梦网站模板安装
  • 网站设计与网页制作代码大全网站开发还找到工作吗
  • 给设计网站做图会字体侵权吗站长工具seo综合查询张家界新娘
  • 网站的建设与颜色搭配win7在iis中新建一个网站
  • 单位做网站有哪些功能型类的网站
  • 网站怎样做优惠卷移动互联网开发培训
  • 重庆网站建设帝维科技网站做定向的作用
  • 网站建设工作室wp主题模板做污事网站
  • 网站建设 深圳 凡科重庆家居网站制作公司
  • 自己也可以免费轻松创建一个网站企业收录网站有什么用
  • 帮别人做网站违法导航网站开发工具
  • seo网站外包公司字画价格网站建设方案