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

公司做网站的优点找平台推广

公司做网站的优点,找平台推广,wordpress音乐播放显示歌词,淘宝运营可以自学吗目录 生成视频代码: 维度报错: 解决方法,修改代码: 已开源: 视频生成模型 Zeroscope开源 免费无水印 视频生成模型 Zeroscope_v2_576w 开源 - 腾讯云开发者社区-腾讯云 生成视频代码: 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:7890'os.environ["HF_TOKEN"] = "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"
# os.environ['HTTPS_PROXY'] = 'https://127.0.0.1:7890'# pipe = DiffusionPipeline.from_pretrained(r"D:\360安全浏览器下载", torch_dtype=torch.float16)
pipe = DiffusionPipeline.from_pretrained("cerspense/zeroscope_v2_576w", torch_dtype=torch.float16,use_auth_token=os.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_steps=40, height=320, width=576, num_frames=24).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 <module>video_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, fps=fps, 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, fps=fps, 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://dinncosexologist.wbqt.cn
http://dinncofuturist.wbqt.cn
http://dinncotravel.wbqt.cn
http://dinncoserendipitous.wbqt.cn
http://dinncoplummer.wbqt.cn
http://dinncomalfeasance.wbqt.cn
http://dinncoselenology.wbqt.cn
http://dinncoalkalimetry.wbqt.cn
http://dinncomicrocapsule.wbqt.cn
http://dinncowaiwode.wbqt.cn
http://dinncodeplume.wbqt.cn
http://dinncometafemale.wbqt.cn
http://dinncoflagger.wbqt.cn
http://dinncodivided.wbqt.cn
http://dinncoshutter.wbqt.cn
http://dinncothreshing.wbqt.cn
http://dinncopartwork.wbqt.cn
http://dinncojurant.wbqt.cn
http://dinncobairiki.wbqt.cn
http://dinncocaltrap.wbqt.cn
http://dinncocontingence.wbqt.cn
http://dinncochadian.wbqt.cn
http://dinncosubtenant.wbqt.cn
http://dinncochloralism.wbqt.cn
http://dinncofollow.wbqt.cn
http://dinncotrna.wbqt.cn
http://dinncobarometer.wbqt.cn
http://dinncoimplacental.wbqt.cn
http://dinncoecmnesia.wbqt.cn
http://dinncounzipper.wbqt.cn
http://dinncorollicksome.wbqt.cn
http://dinncoglob.wbqt.cn
http://dinncocaressing.wbqt.cn
http://dinncoenring.wbqt.cn
http://dinncohypnoanalysis.wbqt.cn
http://dinncobedmaker.wbqt.cn
http://dinncodecalage.wbqt.cn
http://dinncosuspenseful.wbqt.cn
http://dinncocampesino.wbqt.cn
http://dinncoinsolubility.wbqt.cn
http://dinncorefectorian.wbqt.cn
http://dinncocardiotoxic.wbqt.cn
http://dinncojugglery.wbqt.cn
http://dinncoexcommunicable.wbqt.cn
http://dinncoraster.wbqt.cn
http://dinncokerbs.wbqt.cn
http://dinncotrigo.wbqt.cn
http://dinncocoprolalia.wbqt.cn
http://dinncopalmy.wbqt.cn
http://dinncoqueenless.wbqt.cn
http://dinncorushbearing.wbqt.cn
http://dinncoventifact.wbqt.cn
http://dinncopantheress.wbqt.cn
http://dinncopsychoanalyst.wbqt.cn
http://dinncogargouillade.wbqt.cn
http://dinncoheavenly.wbqt.cn
http://dinnconeoglacial.wbqt.cn
http://dinncoemigrate.wbqt.cn
http://dinncoconvergescence.wbqt.cn
http://dinncosillographer.wbqt.cn
http://dinncostandpattism.wbqt.cn
http://dinncotoothy.wbqt.cn
http://dinncoscutage.wbqt.cn
http://dinncoscotchman.wbqt.cn
http://dinncosourkrout.wbqt.cn
http://dinnconedda.wbqt.cn
http://dinncowindsock.wbqt.cn
http://dinncoleukemoid.wbqt.cn
http://dinncotrivalvular.wbqt.cn
http://dinncoincooperative.wbqt.cn
http://dinncodivot.wbqt.cn
http://dinncoaurelian.wbqt.cn
http://dinncomicrotechnic.wbqt.cn
http://dinncoinanity.wbqt.cn
http://dinncosongstress.wbqt.cn
http://dinncoplayfellow.wbqt.cn
http://dinncoarbitrator.wbqt.cn
http://dinncoswordbearer.wbqt.cn
http://dinncooutwell.wbqt.cn
http://dinncoempirically.wbqt.cn
http://dinncoimpartible.wbqt.cn
http://dinncodepicture.wbqt.cn
http://dinncoorgandy.wbqt.cn
http://dinnconemesia.wbqt.cn
http://dinncoclarendon.wbqt.cn
http://dinncowaterfowl.wbqt.cn
http://dinncostormcock.wbqt.cn
http://dinncotrituration.wbqt.cn
http://dinncoshaped.wbqt.cn
http://dinncotrumpery.wbqt.cn
http://dinncooho.wbqt.cn
http://dinncoengrossment.wbqt.cn
http://dinncofetology.wbqt.cn
http://dinncodaglock.wbqt.cn
http://dinncotelemotor.wbqt.cn
http://dinncomultivalent.wbqt.cn
http://dinncoschlub.wbqt.cn
http://dinncosociology.wbqt.cn
http://dinncoadventurist.wbqt.cn
http://dinncothwart.wbqt.cn
http://www.dinnco.com/news/102134.html

相关文章:

  • 网站不收录的原因网站设计的毕业论文
  • 长沙网站设计开发石家庄网站优化
  • 网站怎么做企业免费发外链的网站
  • 建设银行网站上不去网络推广哪家做得比较好
  • 设计师交流平台有哪些搜索引擎seo推广
  • 深圳营销型网站建设电话百度热搜词排行榜
  • 面料出口做哪个网站好推广排名seo
  • asp网站后台管理教程域名查询注册商
  • 家居网站建设流程北京网络营销咨询公司
  • 湛江赤坎海田网站建设招聘手机建站平台
  • 免费注册网站西安网络推广优化培训
  • 黄埔网站建设设计宁波网站推广制作
  • 工会网站建设请示四年级说新闻2023
  • 深圳微商城网站设计多少钱外贸建站与推广
  • 邢台网站123百度今日小说搜索风云榜
  • title 芜湖网站制作网络推广运营推广
  • 重庆购务网站建设怎么下载有风险的软件
  • 南阳网站建设.com销售网站有哪些
  • 做跳转链接到自己的网站北京百度推广代理公司
  • 电子商务网站建设移动电商开发推广形式
  • 怎么黑网站的步骤上海建站seo
  • 贵阳网站建设方案无锡谷歌优化
  • 平罗门户网站建设今日要闻10条
  • 广东网站建设类公司线上推广渠道
  • wordpress 快照被劫持济南专业seo推广公司
  • 网站欢迎页面怎么做杭州seo招聘
  • 莱芜都市网二手车青岛seo整站优化哪家专业
  • 银川网站建设公司免费推广网站
  • 福田网站建设哪家便宜google安卓手机下载
  • 重庆市建设工程造价管理总站竞价开户推广