Janus-Pro, built on the DeepSeek-LLM-7B-base, is an advanced multimodal framework designed to unify understanding and generation tasks. By decoupling visual encoding into separate pathways while maintaining a unified transformer architecture, it resolves conflicts between visual understanding and generation. Equipped with the SigLIP-L vision encoder for image input and an efficient tokenizer for image generation, Janus-Pro delivers high performance across multimodal benchmarks, surpassing unified models and competing effectively with task-specific approaches. Its simplicity, flexibility, and robust design make it a strong contender for next-generation vision-language models.
Resource
HuggingFace
Link: https://huggingface.co/deepseek-ai/Janus-Pro-7B
GitHub
Link: https://github.com/deepseek-ai/Janus
Prerequisites for Installing DeepSeek Janus Pro 7B Locally
Make sure you have the following:
GPUs: 1xRTXA6000 (for smooth execution).
Disk Space: 100 GB free.
RAM: 64 GB(48 Also works) but we use 64 for smooth execution
CPU: 64 Cores(48 Also works)but we use 64 for smooth execution
Step-by-Step Process to Install NVIDIA SANA Model Locally
For the purpose of this tutorial, we will use a GPU-powered Virtual Machine offered by NodeShift; however, you can replicate the same steps with any other cloud provider of your choice. NodeShift provides the most affordable Virtual Machines at a scale that meets GDPR, SOC2, and ISO27001 requirements.
Step 1: Sign Up and Set Up a NodeShift Cloud Account
Visit the NodeShift Platform and create an account. Once you’ve signed up, log into your account.
Follow the account setup process and provide the necessary details and information.
Step 2: Create a GPU Node (Virtual Machine)
GPU Nodes are NodeShift’s GPU Virtual Machines, on-demand resources equipped with diverse GPUs ranging from H100s to A100s. These GPU-powered VMs provide enhanced environmental control, allowing configuration adjustments for GPUs, CPUs, RAM, and Storage based on specific requirements.
Navigate to the menu on the left side. Select the GPU Nodes option, create a GPU Node in the Dashboard, click the Create GPU Node button, and create your first Virtual Machine deployment.\
Step 3: Select a Model, Region, and Storage
In the “GPU Nodes” tab, select a GPU Model and Storage according to your needs and the geographical region where you want to launch your model.
We will use 1x RTX A6000 GPU for this tutorial to achieve the fastest performance. However, you can choose a more affordable GPU with less VRAM if that better suits your requirements.
Step 4: Select Authentication Method
There are two authentication methods available: Password and SSH Key. SSH keys are a more secure option. To create them, please refer to our official documentation.
Step 5: Choose an Image
Next, you will need to choose an image for your Virtual Machine. We will deploy DeepSeek Janus Pro 7B on an NVIDIA Cuda Virtual Machine. This proprietary, closed-source parallel computing platform will allow you to install DeepSeek Janus Pro 7B on your GPU Node.
After choosing the image, click the ‘Create’ button, and your Virtual Machine will be deployed.
Step 6: Virtual Machine Successfully Deployed
You will get visual confirmation that your node is up and running.
Step 7: Connect to GPUs using SSH
NodeShift GPUs can be connected to and controlled through a terminal using the SSH key provided during GPU creation.
Once your GPU Node deployment is successfully created and has reached the ‘RUNNING’ status, you can navigate to the page of your GPU Deployment Instance. Then, click the ‘Connect’ button in the top right corner.
Now open your terminal and paste the proxy SSH IP or direct SSH IP.
Next, if you want to check the GPU details, run the command below:
nvidia-smi
Step 8: Check the Available Python version and Install the new version
Run the following commands to check the available Python version.
If you check the version of the python, system has Python 3.8.1 available by default. To install a higher version of Python, you’ll need to use the deadsnakes PPA.
Run the following commands to add the deadsnakes PPA:
sudo apt update
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
Step 9: Install Python 3.11
Now, run the following command to install Python 3.11 or another desired version:
sudo apt install -y python3.11 python3.11-distutils python3.11-venv
Step 10: Update the Default Python3 Version
Now, run the following command to link the new Python version as the default python3:
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2
sudo update-alternatives --config python3
Then, run the following command to verify that the new Python version is active:
python3 --version
Step 11: Install and Update Pip
Run the following command to install and update the pip:
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip
Then, run the following command to check the version of pip:
pip --version
Step 12: Clone the Repository
Run the following command to clone the DeepSeek Janus repository:
git clone https://github.com/deepseek-ai/Janus.git
cd Janus
Step 13: Install the Project Dependencies
Run the following command to install the project dependencies:
pip install -e .
Step 14: Install Gradio
Run the following command to install the gradio:
pip install -e .[gradio]
Step 15: Run the Server
Execute the following command to run the server:
python3 demo/app_januspro.py
Step 16: Access the Application
Accessing the application at:
Running on local URL: http://127.0.0.1:7860
Running on public URL: https://0fac078df655921b11.gradio.live
Step 17: Multimodal Understanding
Step 18: Text-to-Image Generation
Conclusion
In conclusion, DeepSeek Janus Pro 7B is a groundbreaking multimodal framework designed to unify and optimize tasks involving multimodal understanding and text-to-image generation. By leveraging its decoupled visual encoding and unified transformer architecture, it surpasses traditional unified models while maintaining the flexibility and simplicity needed for diverse applications. With detailed installation guidelines and compatibility with advanced GPU setups, Janus Pro is well-suited for researchers and developers aiming to explore the next frontier of multimodal capabilities. Its robust performance and innovative design mark it as a promising tool for future advancements in vision-language integration.
Top comments (0)