Janus icon indicating copy to clipboard operation
Janus copied to clipboard

image_processing_auto.py:590

Open xshy1213 opened this issue 1 year ago • 5 comments

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

xshy1213 avatar Jan 29 '25 16:01 xshy1213

然后我更新了一下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'

xshy1213 avatar Jan 29 '25 16:01 xshy1213

@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)

dfgh012316 avatar Jan 29 '25 19:01 dfgh012316

配置修改以后

(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 的依赖 ?

xshy1213 avatar Jan 30 '25 05:01 xshy1213

Hi xshy1213, did you resolve the issue?

ShawnLi1102 avatar Feb 01 '25 22:02 ShawnLi1102

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

wz-dong avatar Feb 02 '25 08:02 wz-dong