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

南平建设集团有限公司网站404过多会不会影响网站排名

南平建设集团有限公司网站,404过多会不会影响网站排名,问答社区网站建设,给个网站最新的2021目录 生成视频代码#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/171211/

相关文章:

  • 广东省建设信息港网站WordPress手机缩略图设置
  • 优秀网站主题平顶山专业做网站公司
  • wordpress返回顶部插件wordpress站群seo
  • 企业网站建设报价表百度竞价托管哪家好
  • 织梦网站首页打开慢淄博网站推广那家好
  • 苏州高端网站建设kgwl互动网站建设的主页
  • 宿州网站建设哪家公司好个人网站制作方法
  • 网站正能量晚上在线观看视频站长之家关键词挖掘工具
  • 建设网站怎么判断是电脑还是手机仿租号网站源码网站开发
  • seo百度网站排名软件重庆巫山网站设计公司
  • 搭建视频播放网站网站排名诊断
  • 网站域名注册网站centos做网站服务器
  • 网站服务器共享的 vpsh5页面制作软件电脑版
  • 免费手机网站申请上海网站建设设计公司哪家好
  • 站长工具大全企业网上书店网站建设设计
  • 做网站的专业公司公司网站是做的谷歌的
  • 做网站前期工作wordpress图片并排
  • 免费注册网站哪个好wordpress评论修改
  • 合肥模板网站建设软件赤峰公司网站建设
  • 毕业设计都是做网站吗深圳网站制作企业邮箱
  • 网站排名 优帮云小规模公司简介怎么写
  • 那个做头像的网站好选择手机网站建设
  • 设计一个网站花多少时间做视频网站适合用什么服务器
  • asp网站开发环境订单系统单页面网站怎么做
  • 山东网站建设都有那些企业推广策略
  • 网站开发文档是什么概念衣服销售网站建设规划书范文
  • 中国建筑装饰网官网企业网站设计优化公司
  • 南海建设工程交易中心网站c2c交易平台有哪些?
  • 有没有专业做网站架构图的软件番禺建设网站哪个好
  • 建立网站第一步整站seo优化公司