智谱CogVideoX系列新开源CogVideoX-5b,视频生成质量更高,视觉效果更好,此前开源的版本为CogVideoX-2B。
GIF有点卡 ...
提示词:Picturethis:asleek,confidentcatloungingcasuallyinasun-drenchedroom,itsfurglisteningunderthewarmrays.Butwhatsetsthisfelineapartisnotjustitsglossycoatorthegracefulpoiseitexudes;it'sthepairofstylishsunglassesperchedonitsnose,addinganairofmysteryandcoolnesstoitsdemeanor.Thesunglasses,withtheirreflectivelenses,hidethecat'senigmaticeyes,makingitseemasifit'sponderinglife'smysteriesorperhapsjustplanningitsnextmischievousadventure.Assunlightfiltersthroughthewindow,castingpatternsonthefloor,thecat,utterlyunfazedbyitsunusualaccessory,givesoffavibeofeffortlesschic.Itsitsthere,apictureofserenityanddetachment,occasionallyflickingitstailorlettingoutasoftpurr,completelyembodyingtheessenceofcool.Thiscatdoesn'tjustwearsunglasses;itownsthelook,makinganyonewhoglancesitswaydoadouble-take,charmedbythesightofsuchanunexpectedyetstrikingfashionstatement.
提示词:Inaheartwarmingscene,adelightfulpandabearfindsitselfinthegentleembraceofahuman,engaginginwhatcanonlybedescribedasawhimsicaldance.Thepanda,withitsstrikingblackandwhitefur,looksupwithtrusting,curiouseyes,itsroundfaceframedbyfuzzyears.Thehuman,filledwithjoyandawe,carefullysupportsthepanda'ssoft,plumpbody,guidingitinaseriesofgentle,swayingmovements.Astheymovetogether,thepanda'sclumsyyetendearingattemptstomimictherhythmcreateamomentofpuremagic.Itstinypawsoccasionallyreachout,touchingthehuman'shands,asiftryingtounderstandthisnovelformofinteraction.Aroundthem,theairisfilledwithlaughterandsoftmusic,enhancingtheenchantmentoftheirdance.Thisuniqueencounter,ablendofnature'sinnocenceandhumanaffection,unfoldslikeatenderdanceoffriendship,leavinganindeliblemarkofjoyandconnectiononallwhowitnessit.
推理的硬件需求如下:
•FP16 精度:
• 使用 diffusers:需要12.5GB显存
•INT8 精度:
• 使用 diffusers with torchaudio:需要7.8GB显存
•BF16 精度:
• 使用 diffusers:需要20.7GB显存
•INT8 精度:
• 使用 diffusers with torchaudio:需要11.4GB显存
体验界面如下:
本模型已经支持使用 Huggingface 的diffusers库进行部署,你可以按照以下步骤进行部署。
#diffusers>=0.30.1
#transformers>=0.44.0
#accelerate>=0.33.0(建议从源代码安装)
#imageio-ffmpeg>=0.5.1
pipinstall--upgradetransformersacceleratediffusersimageio-ffmpegimporttorch
fromdiffusersimportCogVideoXPipeline
fromdiffusers.utilsimportexport_to_video
prompt=(
"Apanda,dressedinasmall,redjacketandatinyhat,sitsonawoodenstool"
"inaserenebambooforest.Thepanda'sfluffypawsstrumaminiatureacoustic"
"guitar,producingsoft,melodictunes.Nearby,afewotherpandasgather,"
"watchingcuriouslyandsomeclappinginrhythm.Sunlightfiltersthroughthetall"
"bamboo,castingagentleglowonthescene.Thepanda'sfaceisexpressive,showing"
"concentrationandjoyasitplays.Thebackgroundincludesasmall,flowingstream"
"andvibrantgreenfoliage,enhancingthepeacefulandmagicalatmosphereofthis"
"uniquemusicalperformance."
)
pipe=CogVideoXPipeline.from_pretrained(
"THUDM/CogVideoX-5b",
torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()
pipe.vae.enable_tiling()
video=pipe(
prompt=prompt,
num_videos_per_prompt=1,
num_inference_steps=50,
num_frames=49,
guidance_scale=6,
generator=torch.Generator(device="cuda").manual_seed(42),
).frames[0]
export_to_video(video,"output.mp4",fps=8)
| 欢迎光临 链载Ai (https://www.lianzai.com/) | Powered by Discuz! X3.5 |