3 min to read
JanusFlow 1.3B is a text-to-image generator developed by DeepSeek, designed to provide versatile image creation capabilities from textual prompts. It is a part of DeepSeek's Janus family of models, known for multimodal understanding and generation.
This article provides a comprehensive guide on how to install and set up JanusFlow 1.3B on a Linux system, ensuring you can leverage its potential for various applications.
Before starting the installation, ensure your Linux system meets the following requirements:
First, open your terminal and update the package list:
sudo apt update
Next, install Python 3.10 (if not already installed) and pip:
sudo apt install python3.10 python3-pip
Verify the installation:
python3.10 --version
pip3 --version
Clone the Janus project repository from GitHub:
git clone https://github.com/deepseek-ai/Janus.git
Navigate to the cloned directory:
cd Janus
Create a virtual environment to manage dependencies:
python3.10 -m venv venv
source venv/bin/activate
Upgrade pip and install required packages:
python3.10 -m pip install --upgrade pip
pip install -e .
pip install diffusers[torch]
Download the JanusFlow 1.3B model from Hugging Face:
wget https://huggingface.co/deepseek-ai/JanusFlow-1.3B/resolve/main/diffusion_pytorch_model.bin
Create a directory and move the model file:
mkdir -p ./model/JanusFlow-1.3B
mv diffusion_pytorch_model.bin ./model/JanusFlow-1.3B/
Create and edit a .env file:
touch .env
Add the following line:
export IMAGE_MODEL_PATH="./model/JanusFlow-1.3B"
Load the environment variables:
source .env
Create a Python script named test_generate.py:
import torch
from diffusers import StableDiffusionPipeline
model_id = "your_model_path/JanusFlow-1.3B"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "A futuristic cityscape, ultra detailed, photorealistic"
image = pipe(prompt).images[0]
image.save("futuristic_cityscape.png")
Replace "your_model_path/JanusFlow-1.3B" with the actual model path and run the script:
python test_generate.py
JanusModelLoader Error:sudo apt install git.nvcc --version.nvidia-smi to track GPU performance.JanusFlow 1.3B is a powerful tool for text-to-image generation, offering endless possibilities for creativity and innovation. Whether you're generating art, designing prototypes, or exploring AI capabilities, JanusFlow 1.3B is a valuable addition to your toolkit.
Connect with top remote developers instantly. No commitment, no risk.
Tags
Discover our most popular articles and guides
Running Android emulators on low-end PCs—especially those without Virtualization Technology (VT) or a dedicated graphics card—can be a challenge. Many popular emulators rely on hardware acceleration and virtualization to deliver smooth performance.
The demand for Android emulation has soared as users and developers seek flexible ways to run Android apps and games without a physical device. Online Android emulators, accessible directly through a web browser.
Discover the best free iPhone emulators that work online without downloads. Test iOS apps and games directly in your browser.
Top Android emulators optimized for gaming performance. Run mobile games smoothly on PC with these powerful emulators.
The rapid evolution of large language models (LLMs) has brought forth a new generation of open-source AI models that are more powerful, efficient, and versatile than ever.
ApkOnline is a cloud-based Android emulator that allows users to run Android apps and APK files directly from their web browsers, eliminating the need for physical devices or complex software installations.
Choosing the right Android emulator can transform your experience—whether you're a gamer, developer, or just want to run your favorite mobile apps on a bigger screen.
The rapid evolution of large language models (LLMs) has brought forth a new generation of open-source AI models that are more powerful, efficient, and versatile than ever.