[{"data":1,"prerenderedAt":996},["ShallowReactive",2],{"content-query-ykU77GU2DQ":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"body":13,"_type":990,"_id":991,"_source":992,"_file":993,"_stem":994,"_extension":995},"/news/en/3613","en",false,"","Deploying a DeepSeek Model: Janus-Pro on OrangePi AIpro Development Board","In the 2025 Chinese New Year, the AI field witnessed another wave of innovation with the emergence of DeepSeek&#39;s Janus-Pro model, featuring an innovative dual-path architecture and powerful multimodal interaction capabilities.","2025-02-20","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/f12a66046cdd4827bb4da22417f49b79.png","news",{"type":14,"children":15,"toc":962},"root",[16,24,35,41,46,51,62,71,80,88,96,101,109,117,126,136,141,155,160,167,193,200,209,221,228,233,242,251,262,272,281,289,298,306,314,323,328,341,348,353,367,376,388,395,402,420,436,443,448,458,470,478,490,500,508,517,528,536,541,548,553,558,566,577,584,596,604,616,624,633,638,646,655,677,684,689,698,703,711,716,723,732,743,748,756,765,774,783,788,796,801,840,847,856,864,873,878,886,891,898,903,910,919,924,932,943,955],{"type":17,"tag":18,"props":19,"children":21},"element","h1",{"id":20},"deploying-a-deepseek-model-janus-pro-on-orangepi-aipro-development-board",[22],{"type":23,"value":8},"text",{"type":17,"tag":25,"props":26,"children":28},"h3",{"id":27},"introduction",[29],{"type":17,"tag":30,"props":31,"children":32},"strong",{},[33],{"type":23,"value":34},"Introduction",{"type":17,"tag":36,"props":37,"children":38},"p",{},[39],{"type":23,"value":40},"In the 2025 Chinese New Year, the AI field witnessed another wave of innovation with the emergence of DeepSeek's Janus-Pro model, featuring an innovative dual-path architecture and powerful multimodal interaction capabilities.",{"type":17,"tag":36,"props":42,"children":43},{},[44],{"type":23,"value":45},"To help developers get started quickly, we have deployed the DeepSeek-Janus-Pro model on the 24-GB OrangePi AIpro (20T) development board using the MindSpore AI framework and MindSpore NLP suite. We hope that through our efforts, we can contribute to the development of the AI community and encourage more people to participate in the AI revolution. The following provides a detailed tutorial for deploying DeepSeek-Janus-Pro.",{"type":17,"tag":36,"props":47,"children":48},{},[49],{"type":23,"value":50},"Open source links:",{"type":17,"tag":36,"props":52,"children":53},{},[54],{"type":17,"tag":55,"props":56,"children":60},"a",{"href":57,"rel":58},"https://gitee.com/mindspore-lab/mindnlp.git",[59],"nofollow",[61],{"type":23,"value":57},{"type":17,"tag":36,"props":63,"children":64},{},[65],{"type":17,"tag":55,"props":66,"children":69},{"href":67,"rel":68},"https://github.com/mindspore-lab/mindnlp.git",[59],[70],{"type":23,"value":67},{"type":17,"tag":25,"props":72,"children":74},{"id":73},"preparation",[75],{"type":17,"tag":30,"props":76,"children":77},{},[78],{"type":23,"value":79},"Preparation",{"type":17,"tag":36,"props":81,"children":82},{},[83],{"type":17,"tag":30,"props":84,"children":85},{},[86],{"type":23,"value":87},"Hardware and Software Requirements",{"type":17,"tag":36,"props":89,"children":90},{},[91],{"type":17,"tag":30,"props":92,"children":93},{},[94],{"type":23,"value":95},"Hardware:",{"type":17,"tag":36,"props":97,"children":98},{},[99],{"type":23,"value":100},"One OrangePi AIpro (20T) development board, mouse, keyboard, display, network cable, and power cable",{"type":17,"tag":36,"props":102,"children":103},{},[104],{"type":17,"tag":30,"props":105,"children":106},{},[107],{"type":23,"value":108},"Software Environment",{"type":17,"tag":36,"props":110,"children":111},{},[112],{"type":17,"tag":113,"props":114,"children":116},"img",{"alt":7,"src":115},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/c2720d2016dd4712a4668ce767bc6481.png",[],{"type":17,"tag":25,"props":118,"children":120},{"id":119},"step-1-burning-an-image",[121],{"type":17,"tag":30,"props":122,"children":123},{},[124],{"type":23,"value":125},"Step 1: Burning an Image",{"type":17,"tag":127,"props":128,"children":130},"h4",{"id":129},"_1-download-an-image",[131],{"type":17,"tag":30,"props":132,"children":133},{},[134],{"type":23,"value":135},"1. Download an image.",{"type":17,"tag":36,"props":137,"children":138},{},[139],{"type":23,"value":140},"Note: Different Orange Pi models require different images. Download the image specifically for the OrangePi AIpro (20T).",{"type":17,"tag":36,"props":142,"children":143},{},[144,146,153],{"type":23,"value":145},"First, download the OrangePi AIpro (20T) development board image from the official website: ",{"type":17,"tag":55,"props":147,"children":150},{"href":148,"rel":149},"http://www.orangepi.cn/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-AIpro(20T).html",[59],[151],{"type":23,"value":152},"http://www.orangepi.cn/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-AIpro%2820T%29.html",{"type":23,"value":154},".",{"type":17,"tag":36,"props":156,"children":157},{},[158],{"type":23,"value":159},"Upon entering the page, you will see two image environments: Ubuntu and openEuler. This tutorial uses the Ubuntu image as an example.",{"type":17,"tag":36,"props":161,"children":162},{},[163],{"type":17,"tag":113,"props":164,"children":166},{"alt":7,"src":165},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/6349bfc0df254a76bf142e3efd208a93.png",[],{"type":17,"tag":36,"props":168,"children":169},{},[170,172,177,179,184,186,191],{"type":23,"value":171},"Click ",{"type":17,"tag":30,"props":173,"children":174},{},[175],{"type":23,"value":176},"Download",{"type":23,"value":178}," and proceed to Baidu Netdisk. Select ",{"type":17,"tag":30,"props":180,"children":181},{},[182],{"type":23,"value":183},"Ubuntu",{"type":23,"value":185}," and ",{"type":17,"tag":30,"props":187,"children":188},{},[189],{"type":23,"value":190},"opiaipro_20t_ubuntu22.04_desktop_aarch64_20240924.img.xz",{"type":23,"value":192}," to download.",{"type":17,"tag":36,"props":194,"children":195},{},[196],{"type":17,"tag":113,"props":197,"children":199},{"alt":7,"src":198},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/4c5d7ac9c7b446cc86b8a052743316db.png",[],{"type":17,"tag":127,"props":201,"children":203},{"id":202},"_2-burn-the-image",[204],{"type":17,"tag":30,"props":205,"children":206},{},[207],{"type":23,"value":208},"2. Burn the image.",{"type":17,"tag":36,"props":210,"children":211},{},[212,214,219],{"type":23,"value":213},"Prepare an SD card with at least 64G of storage. Insert the SD card into a card reader and run balenaEtcher 1.18 ",{"type":17,"tag":30,"props":215,"children":216},{},[217],{"type":23,"value":218},"as an administrator",{"type":23,"value":220}," to burn the image.",{"type":17,"tag":36,"props":222,"children":223},{},[224],{"type":17,"tag":113,"props":225,"children":227},{"alt":7,"src":226},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/eaf2263bf8a64a8ab96eb8b325c75345.png",[],{"type":17,"tag":36,"props":229,"children":230},{},[231],{"type":23,"value":232},"After selecting the image file and SD card, you can start burning. After the burning is complete, a message is displayed, indicating that the burning is successful.",{"type":17,"tag":25,"props":234,"children":236},{"id":235},"step-2-development-board-startup-and-connection",[237],{"type":17,"tag":30,"props":238,"children":239},{},[240],{"type":23,"value":241},"Step 2: Development Board Startup and Connection",{"type":17,"tag":127,"props":243,"children":245},{"id":244},"_1-connect-to-the-development-board",[246],{"type":17,"tag":30,"props":247,"children":248},{},[249],{"type":23,"value":250},"1. Connect to the development board.",{"type":17,"tag":36,"props":252,"children":253},{},[254,256,261],{"type":23,"value":255},"Insert the SD card with the successfully burned image into the Orange Pi card slot and power on the development board. Ensure that the development board is connected to a display, keyboard, and mouse beforehand. For connection details, refer to the official user manual at ",{"type":17,"tag":55,"props":257,"children":259},{"href":148,"rel":258},[59],[260],{"type":23,"value":148},{"type":23,"value":154},{"type":17,"tag":36,"props":263,"children":264},{},[265,267],{"type":23,"value":266},"After the development board starts up, it supports multiple connection methods, such as serial port connection and network cable connection. For details, see sections 2.9, 3.5, and 3.6 in the user manual. ",{"type":17,"tag":30,"props":268,"children":269},{},[270],{"type":23,"value":271},"Select one of the connection methods to connect to the development board.",{"type":17,"tag":127,"props":273,"children":275},{"id":274},"_2-set-the-swap-memory",[276],{"type":17,"tag":30,"props":277,"children":278},{},[279],{"type":23,"value":280},"2. Set the swap memory.",{"type":17,"tag":36,"props":282,"children":283},{},[284],{"type":17,"tag":30,"props":285,"children":286},{},[287],{"type":23,"value":288},"After logging in to the development board, refer to section 3.18 to set the swap memory to 24 GB.",{"type":17,"tag":25,"props":290,"children":292},{"id":291},"environment-configuration",[293],{"type":17,"tag":30,"props":294,"children":295},{},[296],{"type":23,"value":297},"Environment Configuration",{"type":17,"tag":36,"props":299,"children":300},{},[301],{"type":17,"tag":30,"props":302,"children":303},{},[304],{"type":23,"value":305},"01",{"type":17,"tag":36,"props":307,"children":308},{},[309],{"type":17,"tag":30,"props":310,"children":311},{},[312],{"type":23,"value":313},"CANN Upgrade",{"type":17,"tag":127,"props":315,"children":317},{"id":316},"_1-download-the-cann-package",[318],{"type":17,"tag":30,"props":319,"children":320},{},[321],{"type":23,"value":322},"1. Download the CANN package.",{"type":17,"tag":36,"props":324,"children":325},{},[326],{"type":23,"value":327},"The image comes pre-installed with CANN 7.0, which needs to be upgraded.",{"type":17,"tag":36,"props":329,"children":330},{},[331,333,339],{"type":23,"value":332},"In the development board system, visit the official website (",{"type":17,"tag":55,"props":334,"children":337},{"href":335,"rel":336},"https://www.hiascend.com/developer/download/community/result?module=cann&cann=8.0.RC3.alpha002",[59],[338],{"type":23,"value":335},{"type":23,"value":340},") and filter the information as shown in the following figure.",{"type":17,"tag":36,"props":342,"children":343},{},[344],{"type":17,"tag":113,"props":345,"children":347},{"alt":7,"src":346},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/3d128e304bc3437a987845e24c67941f.png",[],{"type":17,"tag":36,"props":349,"children":350},{},[351],{"type":23,"value":352},"Download the following files:",{"type":17,"tag":36,"props":354,"children":355},{},[356,361,362],{"type":17,"tag":30,"props":357,"children":358},{},[359],{"type":23,"value":360},"Ascend-cann-toolkit_8.0.RC3.alpha002_linux-aarch64.run",{"type":23,"value":185},{"type":17,"tag":30,"props":363,"children":364},{},[365],{"type":23,"value":366},"Ascend-cann-kernels-310b_8.0.RC3.alpha002_linux.run",{"type":17,"tag":127,"props":368,"children":370},{"id":369},"_2-install-the-cann-package",[371],{"type":17,"tag":30,"props":372,"children":373},{},[374],{"type":23,"value":375},"2. Install the CANN package.",{"type":17,"tag":36,"props":377,"children":378},{},[379,381,386],{"type":23,"value":380},"After the download is complete, go to the download directory. If you use a browser to download the file, the file is stored in the ",{"type":17,"tag":30,"props":382,"children":383},{},[384],{"type":23,"value":385},"~/Downloads",{"type":23,"value":387}," directory by default. In the terminal, run the following commands (comments are provided after the # symbol).",{"type":17,"tag":36,"props":389,"children":390},{},[391],{"type":17,"tag":113,"props":392,"children":394},{"alt":7,"src":393},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/f49609aae037416abbcd5064ddb5c3c6.png",[],{"type":17,"tag":36,"props":396,"children":397},{},[398],{"type":17,"tag":113,"props":399,"children":401},{"alt":7,"src":400},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/81c6d87f073d4cf48e7fa7d7e77a5ffe.png",[],{"type":17,"tag":36,"props":403,"children":404},{},[405,407,412,414,418],{"type":23,"value":406},"sudo su # You will be prompted for a password; the default is ",{"type":17,"tag":30,"props":408,"children":409},{},[410],{"type":23,"value":411},"Mind@123",{"type":23,"value":413},". Characters will not be displayed during input, and you will switch to the ",{"type":17,"tag":30,"props":415,"children":416},{},[417],{"type":23,"value":14},{"type":23,"value":419}," user after inputting the password.",{"type":17,"tag":36,"props":421,"children":422},{},[423,425,429,431,435],{"type":23,"value":424},"At this point, you have switched to the ",{"type":17,"tag":30,"props":426,"children":427},{},[428],{"type":23,"value":14},{"type":23,"value":430}," user, and the terminal prompt changes to ",{"type":17,"tag":30,"props":432,"children":433},{},[434],{"type":23,"value":14},{"type":23,"value":154},{"type":17,"tag":36,"props":437,"children":438},{},[439],{"type":17,"tag":113,"props":440,"children":442},{"alt":7,"src":441},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/7e7f0f8f07734f13842118eb3319f8c6.png",[],{"type":17,"tag":36,"props":444,"children":445},{},[446],{"type":23,"value":447},"Run the following command to grant execute permission on the two downloaded installation packages:",{"type":17,"tag":449,"props":450,"children":452},"pre",{"code":451},"chmod +x Ascend*\n",[453],{"type":17,"tag":454,"props":455,"children":456},"code",{"__ignoreMap":7},[457],{"type":23,"value":451},{"type":17,"tag":36,"props":459,"children":460},{},[461,463,468],{"type":23,"value":462},"Run the following command to install the ",{"type":17,"tag":30,"props":464,"children":465},{},[466],{"type":23,"value":467},"toolkit",{"type":23,"value":469}," package (approximately 10 minutes required):",{"type":17,"tag":449,"props":471,"children":473},{"code":472},"./Ascend-cann-toolkit_8.0.RC3.alpha002_linux-aarch64.run --install\n",[474],{"type":17,"tag":454,"props":475,"children":476},{"__ignoreMap":7},[477],{"type":23,"value":472},{"type":17,"tag":36,"props":479,"children":480},{},[481,483,488],{"type":23,"value":482},"Enter ",{"type":17,"tag":30,"props":484,"children":485},{},[486],{"type":23,"value":487},"Y",{"type":23,"value":489}," as prompted.",{"type":17,"tag":36,"props":491,"children":492},{},[493,494,499],{"type":23,"value":462},{"type":17,"tag":30,"props":495,"children":496},{},[497],{"type":23,"value":498},"kernels",{"type":23,"value":469},{"type":17,"tag":449,"props":501,"children":503},{"code":502},"./Ascend-cann-kernels-310b_8.0.RC3.alpha002_linux.run --install\n",[504],{"type":17,"tag":454,"props":505,"children":506},{"__ignoreMap":7},[507],{"type":23,"value":502},{"type":17,"tag":36,"props":509,"children":510},{},[511,512,516],{"type":23,"value":482},{"type":17,"tag":30,"props":513,"children":514},{},[515],{"type":23,"value":487},{"type":23,"value":489},{"type":17,"tag":36,"props":518,"children":519},{},[520,522,526],{"type":23,"value":521},"After ",{"type":17,"tag":30,"props":523,"children":524},{},[525],{"type":23,"value":498},{"type":23,"value":527}," is installed, run the following command:",{"type":17,"tag":449,"props":529,"children":531},{"code":530},"ls /usr/local/Ascend/ascend-toolkit/latest/opp/built-in/op_impl/ai_core/tbe/kernel/\n",[532],{"type":17,"tag":454,"props":533,"children":534},{"__ignoreMap":7},[535],{"type":23,"value":530},{"type":17,"tag":36,"props":537,"children":538},{},[539],{"type":23,"value":540},"The following information is displayed.",{"type":17,"tag":36,"props":542,"children":543},{},[544],{"type":17,"tag":113,"props":545,"children":547},{"alt":7,"src":546},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/87892e586d9245a3869a1d0f9f934332.png",[],{"type":17,"tag":36,"props":549,"children":550},{},[551],{"type":23,"value":552},"If the output is incorrect, reinstall CANN.",{"type":17,"tag":36,"props":554,"children":555},{},[556],{"type":23,"value":557},"After the installation is complete, run the following command in the terminal:",{"type":17,"tag":449,"props":559,"children":561},{"code":560},"exit\n",[562],{"type":17,"tag":454,"props":563,"children":564},{"__ignoreMap":7},[565],{"type":23,"value":560},{"type":17,"tag":36,"props":567,"children":568},{},[569,571,575],{"type":23,"value":570},"Exit the ",{"type":17,"tag":30,"props":572,"children":573},{},[574],{"type":23,"value":14},{"type":23,"value":576}," user. The terminal changes back to the following.",{"type":17,"tag":36,"props":578,"children":579},{},[580],{"type":17,"tag":113,"props":581,"children":583},{"alt":7,"src":582},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/825324a69d324f41bf9e9aec923ab090.png",[],{"type":17,"tag":36,"props":585,"children":586},{},[587,589,594],{"type":23,"value":588},"Run the following commands to set environment variables (the current user account must be ",{"type":17,"tag":30,"props":590,"children":591},{},[592],{"type":23,"value":593},"HwHiAiUser",{"type":23,"value":595},"):",{"type":17,"tag":449,"props":597,"children":599},{"code":598},"echo \"source /usr/local/Ascend/ascend-toolkit/set_env.sh\" >> ~/.bashrc\n\nsource ~/.bashrc\n",[600],{"type":17,"tag":454,"props":601,"children":602},{"__ignoreMap":7},[603],{"type":23,"value":598},{"type":17,"tag":36,"props":605,"children":606},{},[607],{"type":17,"tag":30,"props":608,"children":609},{},[610],{"type":17,"tag":611,"props":612,"children":613},"em",{},[614],{"type":23,"value":615},"02",{"type":17,"tag":36,"props":617,"children":618},{},[619],{"type":17,"tag":30,"props":620,"children":621},{},[622],{"type":23,"value":623},"MindSpore Installation",{"type":17,"tag":127,"props":625,"children":627},{"id":626},"_1-install-dependency-packages",[628],{"type":17,"tag":30,"props":629,"children":630},{},[631],{"type":23,"value":632},"1. Install dependency packages.",{"type":17,"tag":36,"props":634,"children":635},{},[636],{"type":23,"value":637},"Before installing MindSpore version 2.4.10, we need to install the MindSpore dependency packages. In the terminal, run the following commands:",{"type":17,"tag":449,"props":639,"children":641},{"code":640},"pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple\npip install sympy\npip install /usr/local/Ascend/ascend-toolkit/latest/lib64/te-*-py3-none-any.whl\npip install /usr/local/Ascend/ascend-toolkit/latest/lib64/hccl-*-py3-none-any.whl\n",[642],{"type":17,"tag":454,"props":643,"children":644},{"__ignoreMap":7},[645],{"type":23,"value":640},{"type":17,"tag":127,"props":647,"children":649},{"id":648},"_2-install-mindspore",[650],{"type":17,"tag":30,"props":651,"children":652},{},[653],{"type":23,"value":654},"2. Install MindSpore.",{"type":17,"tag":36,"props":656,"children":657},{},[658,660,665,667,676],{"type":23,"value":659},"After the dependency installation is complete, install ",{"type":17,"tag":30,"props":661,"children":662},{},[663],{"type":23,"value":664},"MindSpore 2.4.10",{"type":23,"value":666},". Visit the MindSpore official website at ",{"type":17,"tag":55,"props":668,"children":671},{"href":669,"rel":670},"https://www.mindspore.cn/en",[59],[672],{"type":17,"tag":30,"props":673,"children":674},{},[675],{"type":23,"value":669},{"type":23,"value":154},{"type":17,"tag":36,"props":678,"children":679},{},[680],{"type":17,"tag":113,"props":681,"children":683},{"alt":7,"src":682},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/75e7410c8ba5451e968fa815e6b5e65d.png",[],{"type":17,"tag":36,"props":685,"children":686},{},[687],{"type":23,"value":688},"Select the corresponding MindSpore, Python, and CANN versions (this installation configuration is consistent with the screenshot provided). Then, copy the installation command and execute it in the terminal.",{"type":17,"tag":127,"props":690,"children":692},{"id":691},"_3-check-whether-the-installation-is-successful",[693],{"type":17,"tag":30,"props":694,"children":695},{},[696],{"type":23,"value":697},"3. Check whether the installation is successful.",{"type":17,"tag":36,"props":699,"children":700},{},[701],{"type":23,"value":702},"After MindSpore is installed, run the following command to verify the installation:",{"type":17,"tag":449,"props":704,"children":706},{"code":705},"python -c \"import mindspore;mindspore.set_context(device_target='Ascend');mindspore.run_check()\"\n",[707],{"type":17,"tag":454,"props":708,"children":709},{"__ignoreMap":7},[710],{"type":23,"value":705},{"type":17,"tag":36,"props":712,"children":713},{},[714],{"type":23,"value":715},"The output should be as follows.",{"type":17,"tag":36,"props":717,"children":718},{},[719],{"type":17,"tag":113,"props":720,"children":722},{"alt":7,"src":721},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/3c8cfda6344d4868a4ecc8cb80878221.png",[],{"type":17,"tag":127,"props":724,"children":726},{"id":725},"_03-mindspore-nlp-installation",[727],{"type":17,"tag":30,"props":728,"children":729},{},[730],{"type":23,"value":731},"03 MindSpore NLP Installation",{"type":17,"tag":36,"props":733,"children":734},{},[735,737,741],{"type":23,"value":736},"Note that all commands below must be executed under the ",{"type":17,"tag":30,"props":738,"children":739},{},[740],{"type":23,"value":593},{"type":23,"value":742}," account.",{"type":17,"tag":36,"props":744,"children":745},{},[746],{"type":23,"value":747},"First, download the MindSpore NLP code, which has been adapted for Janus. Then, execute the following commands in the terminal to install MindSpore NLP from the source code:",{"type":17,"tag":449,"props":749,"children":751},{"code":750},"cd ~\ngit clone https://gitee.com/mindspore-lab/mindnlp.git\ncd mindnlp\ngit checkout janus\npip install -e .\n",[752],{"type":17,"tag":454,"props":753,"children":754},{"__ignoreMap":7},[755],{"type":23,"value":750},{"type":17,"tag":25,"props":757,"children":759},{"id":758},"running-cases",[760],{"type":17,"tag":30,"props":761,"children":762},{},[763],{"type":23,"value":764},"Running Cases",{"type":17,"tag":36,"props":766,"children":767},{},[768,769,773],{"type":23,"value":736},{"type":17,"tag":30,"props":770,"children":771},{},[772],{"type":23,"value":593},{"type":23,"value":742},{"type":17,"tag":127,"props":775,"children":777},{"id":776},"_01-downloading-the-janus-model-weight",[778],{"type":17,"tag":30,"props":779,"children":780},{},[781],{"type":23,"value":782},"01 Downloading the Janus Model Weight",{"type":17,"tag":36,"props":784,"children":785},{},[786],{"type":23,"value":787},"Execute the following commands in the terminal:",{"type":17,"tag":449,"props":789,"children":791},{"code":790},"pip install modelscope\n\n\nmodelscope download --model deepseek-ai/Janus-Pro-1B  --local_dir  /home/HwHiAiUser/Janus-Pro-1B\n",[792],{"type":17,"tag":454,"props":793,"children":794},{"__ignoreMap":7},[795],{"type":23,"value":790},{"type":17,"tag":36,"props":797,"children":798},{},[799],{"type":23,"value":800},"The download time depends on your internet speed.",{"type":17,"tag":36,"props":802,"children":803},{},[804,806,811,813,818,820,825,827,832,833,838],{"type":23,"value":805},"After the download is complete, the model weight will be saved in ",{"type":17,"tag":30,"props":807,"children":808},{},[809],{"type":23,"value":810},"/home/HwHiAiUser/Janus-Pro-1B",{"type":23,"value":812},". To save it in another location, modify the ",{"type":17,"tag":30,"props":814,"children":815},{},[816],{"type":23,"value":817},"local_dir",{"type":23,"value":819}," parameter and update the ",{"type":17,"tag":30,"props":821,"children":822},{},[823],{"type":23,"value":824},"model_path",{"type":23,"value":826}," values in ",{"type":17,"tag":30,"props":828,"children":829},{},[830],{"type":23,"value":831},"mindnlp/llm/inference/janus_pro/understanding.py",{"type":23,"value":185},{"type":17,"tag":30,"props":834,"children":835},{},[836],{"type":23,"value":837},"mindnlp/llm/inference/janus_pro/generation.py",{"type":23,"value":839}," to the desired directory address.",{"type":17,"tag":36,"props":841,"children":842},{},[843],{"type":17,"tag":113,"props":844,"children":846},{"alt":7,"src":845},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/0057d91ab51a484a9195b4ac4a7fee1b.png",[],{"type":17,"tag":127,"props":848,"children":850},{"id":849},"_02-model-execution",[851],{"type":17,"tag":30,"props":852,"children":853},{},[854],{"type":23,"value":855},"02 Model Execution",{"type":17,"tag":36,"props":857,"children":858},{},[859],{"type":17,"tag":30,"props":860,"children":861},{},[862],{"type":23,"value":863},"Note: Due to high memory usage, ensure swap memory is set up (refer to section 3.18 of the user manual).",{"type":17,"tag":127,"props":865,"children":867},{"id":866},"_1-run-an-image-understanding-task",[868],{"type":17,"tag":30,"props":869,"children":870},{},[871],{"type":23,"value":872},"1. Run an image understanding task.",{"type":17,"tag":36,"props":874,"children":875},{},[876],{"type":23,"value":877},"Run the image understanding task and enter the following information in the terminal:",{"type":17,"tag":449,"props":879,"children":881},{"code":880},"pip install attrdict\ncd ~/mindnlp/llm/inference/janus_pro\npython understanding.py\n",[882],{"type":17,"tag":454,"props":883,"children":884},{"__ignoreMap":7},[885],{"type":23,"value":880},{"type":17,"tag":36,"props":887,"children":888},{},[889],{"type":23,"value":890},"The input image is as follows.",{"type":17,"tag":36,"props":892,"children":893},{},[894],{"type":17,"tag":113,"props":895,"children":897},{"alt":7,"src":896},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/af520a7729fb4a5283f3a3f30225a5a6.png",[],{"type":17,"tag":36,"props":899,"children":900},{},[901],{"type":23,"value":902},"The execution result is as follows.",{"type":17,"tag":36,"props":904,"children":905},{},[906],{"type":17,"tag":113,"props":907,"children":909},{"alt":7,"src":908},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/047aa5b3fe204268b02e825f589805c5.png",[],{"type":17,"tag":127,"props":911,"children":913},{"id":912},"_2-run-an-image-generation-task",[914],{"type":17,"tag":30,"props":915,"children":916},{},[917],{"type":23,"value":918},"2. Run an image generation task.",{"type":17,"tag":36,"props":920,"children":921},{},[922],{"type":23,"value":923},"Run the image generation task and enter the following information in the terminal:",{"type":17,"tag":449,"props":925,"children":927},{"code":926},"python generation.py\n",[928],{"type":17,"tag":454,"props":929,"children":930},{"__ignoreMap":7},[931],{"type":23,"value":926},{"type":17,"tag":36,"props":933,"children":934},{},[935,937,942],{"type":23,"value":936},"The input prompt is: ",{"type":17,"tag":30,"props":938,"children":939},{},[940],{"type":23,"value":941},"A stunning princess from kabul in red, white traditional clothing, blue eyes, brown hair",{"type":23,"value":154},{"type":17,"tag":36,"props":944,"children":945},{},[946,948,953],{"type":23,"value":947},"The following image is generated in the ",{"type":17,"tag":30,"props":949,"children":950},{},[951],{"type":23,"value":952},"~/mindnlp/llm/inference/janus_pro/generated_samples",{"type":23,"value":954}," directory:",{"type":17,"tag":36,"props":956,"children":957},{},[958],{"type":17,"tag":113,"props":959,"children":961},{"alt":7,"src":960},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2025/02/20/dba2a1fac8cd42bd931599c52e279087.png",[],{"title":7,"searchDepth":963,"depth":963,"links":964},4,[965,967,968,972,976,984],{"id":27,"depth":966,"text":34},3,{"id":73,"depth":966,"text":79},{"id":119,"depth":966,"text":125,"children":969},[970,971],{"id":129,"depth":963,"text":135},{"id":202,"depth":963,"text":208},{"id":235,"depth":966,"text":241,"children":973},[974,975],{"id":244,"depth":963,"text":250},{"id":274,"depth":963,"text":280},{"id":291,"depth":966,"text":297,"children":977},[978,979,980,981,982,983],{"id":316,"depth":963,"text":322},{"id":369,"depth":963,"text":375},{"id":626,"depth":963,"text":632},{"id":648,"depth":963,"text":654},{"id":691,"depth":963,"text":697},{"id":725,"depth":963,"text":731},{"id":758,"depth":966,"text":764,"children":985},[986,987,988,989],{"id":776,"depth":963,"text":782},{"id":849,"depth":963,"text":855},{"id":866,"depth":963,"text":872},{"id":912,"depth":963,"text":918},"markdown","content:news:en:3613.md","content","news/en/3613.md","news/en/3613","md",1776506047281]