[GH-ISSUE #97] Nothing is generated locally #75

Closed
opened 2026-10-26 21:11:36 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @LbISS on GitHub (Jan 29, 2025).
Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/97

Have run commands from "Quick Start" guide. Everything installed successfully, no errors. Running gradio demo via command: "python demo/app_januspro.py". Server is starting successfully, UI is opening.
But it's not generating anything, the loader just keep staying forever, no result generated. No visible processing in the terminal. No heavy GPU load (RTX 4070Ti). Model Janus-Pro-1B.

Image
Image
Image

Originally created by @LbISS on GitHub (Jan 29, 2025). Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/97 Have run commands from "Quick Start" guide. Everything installed successfully, no errors. Running gradio demo via command: "python demo/app_januspro.py". Server is starting successfully, UI is opening. But it's not generating anything, the loader just keep staying forever, no result generated. No visible processing in the terminal. No heavy GPU load (RTX 4070Ti). Model Janus-Pro-1B. ![Image](https://github.com/user-attachments/assets/53fdec14-8d86-4fca-8dfc-a48eb0cf73d2) ![Image](https://github.com/user-attachments/assets/dbf81f11-c7b1-4585-b8d3-b4c4b5c4f2c6) ![Image](https://github.com/user-attachments/assets/91fc557b-baf9-4f49-9f3d-c2c727e38e63)
Author
Owner

@Artrender commented on GitHub (Jan 30, 2025):

Same here!

(janusenv) P:\Janus>python demo/app_januspro.py
Python version is above 3.10, patching the collections module.
C:\Users\artre\anaconda3\envs\janusenv\Lib\site-packages\transformers\models\auto\image_processing_auto.py:590: FutureWarning: The image_processor_class argument is deprecated and will be removed in v4.42. Please use `slow_image_processor_class`, or `fast_image_processor_class` instead
  warnings.warn(
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:08<00:00,  4.03s/it]
Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.48, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with `use_fast=False`.
You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message.
Some kwargs in processor config are unused and will not have any effect: num_image_tokens, sft_format, mask_prompt, image_tag, add_special_token, ignore_id.
* Running on local URL:  http://127.0.0.1:7860

Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.

Image

Image

I still have 100GB free on C after installation

Image

Image

Model Janus-Pro-7B.

<!-- gh-comment-id:2623275942 --> @Artrender commented on GitHub (Jan 30, 2025): Same here! ``` (janusenv) P:\Janus>python demo/app_januspro.py Python version is above 3.10, patching the collections module. C:\Users\artre\anaconda3\envs\janusenv\Lib\site-packages\transformers\models\auto\image_processing_auto.py:590: FutureWarning: The image_processor_class argument is deprecated and will be removed in v4.42. Please use `slow_image_processor_class`, or `fast_image_processor_class` instead warnings.warn( Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:08<00:00, 4.03s/it] Using a slow image processor as `use_fast` is unset and a slow processor was saved with this model. `use_fast=True` will be the default behavior in v4.48, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with `use_fast=False`. You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>. This is expected, and simply means that the `legacy` (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set `legacy=False`. This should only be set if you understand what it means, and thoroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 - if you loaded a llama tokenizer from a GGUF file you can ignore this message. Some kwargs in processor config are unused and will not have any effect: num_image_tokens, sft_format, mask_prompt, image_tag, add_special_token, ignore_id. * Running on local URL: http://127.0.0.1:7860 Could not create share link. Please check your internet connection or our status page: https://status.gradio.app. ``` ![Image](https://github.com/user-attachments/assets/f34de547-489f-4681-9d1f-3a7b268e57ee) ![Image](https://github.com/user-attachments/assets/45499539-40e7-4337-97fe-e4e58a9a662b) I still have 100GB free on C after installation ![Image](https://github.com/user-attachments/assets/47074f92-d25d-4e4f-b4fa-37e91f2b5a86) ![Image](https://github.com/user-attachments/assets/6a3d9aef-9db8-4355-b433-60eaac09ed55) Model Janus-Pro-7B.
Author
Owner

@LbISS commented on GitHub (Feb 1, 2025):

Ok, so I figured it out. I have the same problem as here https://github.com/deepseek-ai/Janus/issues/96. Janus is using pyTorch for CPU by default. Which is slow as hell and not loading all the CPU for some reason, so I didn't event notice load on CPU. It's there, just small, like 20-30%. And then even 10 minutes is not enough to generate something.
So based on the issue I've mentioned above: it's required to install CUDA and reinstall pyTorch with the respective version for it.
I've done:
pip3 uninstall torch torchvision torchaudio
then install Cuda Toolkit 12.6 from official NVidia site https://developer.nvidia.com/cuda-toolkit (only runtime is required, you could uncheck other points on installation, like SDK, drivers, etc.).
Then
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126 (respective command for you platform could be found here: https://pytorch.org/get-started/locally/
And then have restarted Janus - and voila - it's working, 6-10 seconds to generate image on GPU.

<!-- gh-comment-id:2628959491 --> @LbISS commented on GitHub (Feb 1, 2025): Ok, so I figured it out. I have the same problem as here https://github.com/deepseek-ai/Janus/issues/96. Janus is using pyTorch for CPU by default. Which is slow as hell and not loading all the CPU for some reason, so I didn't event notice load on CPU. It's there, just small, like 20-30%. And then even 10 minutes is not enough to generate something. So based on the issue I've mentioned above: it's required to install CUDA and reinstall pyTorch with the respective version for it. I've done: `pip3 uninstall torch torchvision torchaudio` then install Cuda Toolkit 12.6 from official NVidia site https://developer.nvidia.com/cuda-toolkit (only runtime is required, you could uncheck other points on installation, like SDK, drivers, etc.). Then `pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126` (respective command for you platform could be found here: https://pytorch.org/get-started/locally/ And then have restarted Janus - and voila - it's working, 6-10 seconds to generate image on GPU.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/Janus#75
No description provided.