Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing is generated locally #97

Closed
LbISS opened this issue Jan 29, 2025 · 2 comments
Closed

Nothing is generated locally #97

LbISS opened this issue Jan 29, 2025 · 2 comments

Comments

@LbISS
Copy link

LbISS commented Jan 29, 2025

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

@Artrender
Copy link

Artrender commented 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.

@LbISS
Copy link
Author

LbISS commented Feb 1, 2025

Ok, so I figured it out. I have the same problem as here #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.

@LbISS LbISS closed this as completed Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants