[GH-ISSUE #95] image_processing_auto.py:590 #71

Open
opened 2026-10-26 21:11:32 +00:00 by bsakaguchi · 5 comments
Owner

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

C:\ProgramData\anaconda3\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: 0%| | 0/2 [00:00<?, ?it/s]

启动UI的时候报的
python demo/app_januspro.py

Originally created by @xshy1213 on GitHub (Jan 29, 2025). Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/95 C:\ProgramData\anaconda3\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: 0%| | 0/2 [00:00<?, ?it/s] 启动UI的时候报的 python demo/app_januspro.py
Author
Owner

@xshy1213 commented on GitHub (Jan 29, 2025):

然后我更新了一下janus

pip install --upgrade janus

再次启动UI

D:\deepseek\Janus>python demo/app_januspro.py

(base) D:\deepseek\Janus>python demo/app_januspro.py
Traceback (most recent call last):
File "D:\deepseek\Janus\demo\app_januspro.py", line 4, in
from janus.models import MultiModalityCausalLM, VLChatProcessor
ModuleNotFoundError: No module named 'janus.models'

<!-- gh-comment-id:2622198069 --> @xshy1213 commented on GitHub (Jan 29, 2025): 然后我更新了一下janus pip install --upgrade janus 再次启动UI D:\deepseek\Janus>python demo/app_januspro.py (base) D:\deepseek\Janus>python demo/app_januspro.py Traceback (most recent call last): File "D:\deepseek\Janus\demo\app_januspro.py", line 4, in <module> from janus.models import MultiModalityCausalLM, VLChatProcessor ModuleNotFoundError: No module named 'janus.models'
Author
Owner

@dfgh012316 commented on GitHub (Jan 29, 2025):

@xshy1213 我調整了 app_januspro.py 中的 vl_gpt 為以下配置後能夠正常運作
看起來是因為記憶體不足的關係導致的。

vl_gpt = AutoModelForCausalLM.from_pretrained(model_path,
                                              language_config=language_config,
                                              trust_remote_code=True,
                                              device_map="auto",
                                              torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float16)
<!-- gh-comment-id:2622713957 --> @dfgh012316 commented on GitHub (Jan 29, 2025): @xshy1213 我調整了 app_januspro.py 中的 `vl_gpt` 為以下配置後能夠正常運作 看起來是因為記憶體不足的關係導致的。 ``` vl_gpt = AutoModelForCausalLM.from_pretrained(model_path, language_config=language_config, trust_remote_code=True, device_map="auto", torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float16) ```
Author
Owner

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

配置修改以后

(myenvp) D:\deepseek\Janus>python demo/app_januspro.py --device cuda
Python version is above 3.10, patching the collections module.
C:\ProgramData\anaconda3\envs\myenvp\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:02<00:00, 1.09s/it]
Some parameters are on the meta device because they were offloaded to the cpu.
Traceback (most recent call last):
File "D:\deepseek\Janus\demo\app_januspro.py", line 25, in
vl_gpt = vl_gpt.to(torch.bfloat16).cuda()
File "C:\ProgramData\anaconda3\envs\myenvp\lib\site-packages\accelerate\big_modeling.py", line 458, in wrapper
raise RuntimeError("You can't move a model that has some modules offloaded to cpu or disk.")
RuntimeError: You can't move a model that has some modules offloaded to cpu or disk.

更新Gradio 的依赖 ?

<!-- gh-comment-id:2623563726 --> @xshy1213 commented on GitHub (Jan 30, 2025): 配置修改以后 (myenvp) D:\deepseek\Janus>python demo/app_januspro.py --device cuda Python version is above 3.10, patching the collections module. C:\ProgramData\anaconda3\envs\myenvp\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:02<00:00, 1.09s/it] Some parameters are on the meta device because they were offloaded to the cpu. Traceback (most recent call last): File "D:\deepseek\Janus\demo\app_januspro.py", line 25, in <module> vl_gpt = vl_gpt.to(torch.bfloat16).cuda() File "C:\ProgramData\anaconda3\envs\myenvp\lib\site-packages\accelerate\big_modeling.py", line 458, in wrapper raise RuntimeError("You can't move a model that has some modules offloaded to cpu or disk.") RuntimeError: You can't move a model that has some modules offloaded to cpu or disk. 更新Gradio 的依赖 ?
Author
Owner

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

Hi xshy1213, did you resolve the issue?

<!-- gh-comment-id:2629150762 --> @ShawnLi1102 commented on GitHub (Feb 1, 2025): Hi xshy1213, did you resolve the issue?
Author
Owner

@wz-dong commented on GitHub (Feb 2, 2025):

@xshy1213 这个问题你解决了嘛?我也遇到了相同的问题。

<!-- gh-comment-id:2629297487 --> @wz-dong commented on GitHub (Feb 2, 2025): @xshy1213 这个问题你解决了嘛?我也遇到了相同的问题。
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#71
No description provided.