Run DeepSeek Janus Pro 1b on Linux/Ubuntu Using ComfyUI

This guide provides detailed instructions for installing and running the DeepSeek Janus-Pro 1 B model on Linux/Ubuntu system using ComfyUI. Follow these steps to ensure a successful setup.

Run DeepSeek Janus-Pro 7B on Linux/Ubuntu Using ComfyUI

System Requirements

Ensure your system meets the following:

  • OS: Linux (Ubuntu/Debian recommended).
  • Python: Version 3.8 or higher.
  • GPU: NVIDIA GPU with CUDA support (optional but recommended for speed).
  • Dependencies:
    • Git
    • Python3-pip

Installation Steps

1. Update System Packages

sudo apt update && sudo apt upgrade -y  

2. Install Core Dependencies

sudo apt install git python3 python3-pip -y  

3. Install Python 3.10 (Optional)

If your system uses an older Python version:

sudo apt install python3.10 python3.10-distutils  

4. Install PyTorch with CUDA

For NVIDIA GPU users:

pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118  

Note: Replace cu118 with cu121 for CUDA 12.1.

5. Clone ComfyUI Repository

git clone https://github.com/comfyanonymous/ComfyUI.git  
cd ComfyUI  

6. Install ComfyUI Dependencies

pip install -r requirements.txt  

Model Setup

1. Download DeepSeek Janus Pro 1B

  • Obtain model files from Hugging Face.
  • Required files:
    • model.safetensors
    • config.json, tokenizer.json, and other configuration files.

2. Organize Model Files

Create this folder structure inside ComfyUI/models/:

Janus-Pro/  
└── Janus-Pro-1B/  
    ├── config.json  
    ├── model.safetensors  
    ├── tokenizer.json  
    └── ... (other config files)  

3. Install ComfyUI-Janus-Pro Plugin

Option 1: Via ComfyUI Manager

  • Open ComfyUI Manager.
  • Search for "Janus-Pro" and install the plugin.

Option 2: Manual Installation

cd ComfyUI/custom_nodes  
git clone https://github.com/CY-CHENYUE/ComfyUI-Janus-Pro.git  

Running ComfyUI

  1. Access the Interface:
    Open http://localhost:8188 in your browser.

Launch ComfyUI:

python3 app.py  

Generating Images

  1. Load the Model:
    • Use the Checkpoint Loader node.
    • Select Janus-Pro-1B from the dropdown menu.
  2. Build a Workflow:
    • Connect nodes:
      • Prompt Input → KSampler → VAE Decoder → Save Image.
  3. Adjust Settings:
    • Modify steps, cfg scale, and sampler for quality/speed trade-offs.

Example workflow for generating futuristic cityscape:

# Example node configuration (pseudo-code for illustration)  
prompt = "a futuristic cityscape, neon lights, cyberpunk style"  
sampler_config = {"steps": 30, "cfg": 7.5}  
generate_image(prompt=prompt, num_images=4)  

Troubleshooting

Issue Solution
Model not appearing in ComfyUI Ensure files are in ComfyUI/models/Janus-Pro-1B/.
CUDA errors Reinstall PyTorch with the correct CUDA version.
Missing dependencies Run pip install --upgrade -r requirements.txt.

Final Notes

  • For optimal performance, use an NVIDIA GPU with at least 8GB VRAM.
  • Monitor VRAM usage with nvidia-smi during generation.
  • Refer to the DeepSeek Janus Pro 1B documentation for advanced configurations.