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

项目代码中包含太多硬代码了,自己改来改去还是报错,没有生成结果图片,跟Issues#9差不多,只输出一堆中间图片。 #14

Closed
wikeeyang opened this issue Jun 22, 2024 · 3 comments

Comments

@wikeeyang
Copy link

在上报了Issues#3之后,修改如下:

  1. 删除:DETECT_SAM/Grounding-DINO\groundingdino\util\get_tokenlizer.py 脚本中第25行的硬代码:
    return BertModel.from_pretrained("/data2/chengjunhao/THEATERGEN/pretrained_models/dino_bert")
    尝试改成:
    return BertModel.from_pretrained(text_encoder_type)
  2. 从 HF 下载 groundingdino_swint_ogc.pth 模型:
    模型路径:https://hf-mirror.com/ShilongLiu/GroundingDINO/tree/main
    下载到:DETECT_SAM/Grounding-DINO 目录下,否则脚本无法自动下载。

再次运行验证脚本后,终端窗口输出如下:
D:\AITest\AutoStudio\model\pipeline_stable_diffusion.py:41: FutureWarning: Importing DiffusionPipeline or ImagePipelineOutput from diffusers.pipeline_utils is deprecated. Please import from diffusers.pipelines.pipeline_utils instead.
from diffusers.pipeline_utils import DiffusionPipeline
Using box scale: (512, 512)
D:\AITest\AutoStudio\DETECT_SAM/Grounding-DINO\groundingdino\models\GroundingDINO\ms_deform_attn.py:31: UserWarning: Failed to load custom C++ ops. Running on CPU mode Only!
warnings.warn("Failed to load custom C++ ops. Running on CPU mode Only!")
Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertModel: ['cls.predictions.bias', 'cls.predictions.transform.dense.bias', 'cls.predictions.transform.LayerNorm.bias', 'cls.seq_relationship.bias', 'cls.predictions.transform.LayerNorm.weight', 'cls.seq_relationship.weight', 'cls.predictions.transform.dense.weight']

  • This IS expected if you are initializing BertModel from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
  • This IS NOT expected if you are initializing BertModel from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
    Welcome to the AutoStudio
    Loading pipeline components...: 100%|██████████████████████████████████████████████████| 5/5 [00:00<00:00, 5.99it/s]
    You have disabled the safety checker for <class 'model.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing safety_checker=None. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at Safety checker on-off switch for stable diffusion pipeline huggingface/diffusers#254 .
    Succesfully load models
    dialogue 1 turn 1
    Saved boxes visualizations to output/dialogue 1/turn 1/boxes.png ind: None
    ERROR!
    dialogue 1 turn 2
    Saved boxes visualizations to output/dialogue 1/turn 2/boxes.png ind: None
    ERROR!
    dialogue 1 turn 3
    Saved boxes visualizations to output/dialogue 1/turn 3/boxes.png ind: None
    ERROR!
    dialogue 1 turn 4
    Saved boxes visualizations to output/dialogue 1/turn 4/boxes.png ind: None
    ERROR!
    dialogue 1 turn 5
    Saved boxes visualizations to output/dialogue 1/turn 5/boxes.png ind: None
    ERROR!
    dialogue 1 turn 6
    skip
    dialogue 1 turn 7
    skip
    dialogue 1 turn 8
    skip
    dialogue 1 turn 9
    skip
    dialogue 1 turn 10
    skip
    dialogue 1 turn 11
    skip
    dialogue 1 turn 12
    skip
    dialogue 1 turn 13
    skip
    dialogue 1 turn 14
    skip
    dialogue 1 turn 15
    skip
    single dialogue time: 1.032346248626709
    dialogue 2 turn 1
    Saved boxes visualizations to output/dialogue 2/turn 1/boxes.png ind: None
    ERROR!
    dialogue 2 turn 2
    Saved boxes visualizations to output/dialogue 2/turn 2/boxes.png ind: None
    ERROR!
    dialogue 2 turn 3
    Saved boxes visualizations to output/dialogue 2/turn 3/boxes.png ind: None
    ERROR!
    dialogue 2 turn 4
    skip
    dialogue 2 turn 5
    skip
    dialogue 2 turn 6
    skip
    dialogue 2 turn 7
    skip
    dialogue 2 turn 8
    skip
    dialogue 2 turn 9
    skip
    dialogue 2 turn 10
    skip
    dialogue 2 turn 11
    skip
    dialogue 2 turn 12
    skip
    dialogue 2 turn 13
    skip
    dialogue 2 turn 14
    skip
    dialogue 2 turn 15
    skip
    single dialogue time: 0.5198547840118408
    dialogue 3 turn 1
    Saved boxes visualizations to output/dialogue 3/turn 1/boxes.png ind: None
    ERROR!
    dialogue 3 turn 2
    Saved boxes visualizations to output/dialogue 3/turn 2/boxes.png ind: None
    ERROR!
    dialogue 3 turn 3
    Saved boxes visualizations to output/dialogue 3/turn 3/boxes.png ind: None
    ERROR!
    dialogue 3 turn 4
    skip
    dialogue 3 turn 5
    skip
    dialogue 3 turn 6
    skip
    dialogue 3 turn 7
    skip
    dialogue 3 turn 8
    skip
    dialogue 3 turn 9
    skip
    dialogue 3 turn 10
    skip
    dialogue 3 turn 11
    skip
    dialogue 3 turn 12
    skip
    dialogue 3 turn 13
    skip
    dialogue 3 turn 14
    skip
    dialogue 3 turn 15
    skip
    single dialogue time: 0.428234338760376
    dialogue 4 turn 1
    Saved boxes visualizations to output/dialogue 4/turn 1/boxes.png ind: None
    ERROR!
    dialogue 4 turn 2
    Saved boxes visualizations to output/dialogue 4/turn 2/boxes.png ind: None
    ERROR!
    dialogue 4 turn 3
    Saved boxes visualizations to output/dialogue 4/turn 3/boxes.png ind: None
    ERROR!
    dialogue 4 turn 4
    Saved boxes visualizations to output/dialogue 4/turn 4/boxes.png ind: None
    ERROR!
    dialogue 4 turn 5
    Saved boxes visualizations to output/dialogue 4/turn 5/boxes.png ind: None
    ERROR!
    dialogue 4 turn 6
    Saved boxes visualizations to output/dialogue 4/turn 6/boxes.png ind: None
    ERROR!
    dialogue 4 turn 7
    Saved boxes visualizations to output/dialogue 4/turn 7/boxes.png ind: None
    ERROR!
    dialogue 4 turn 8
    Saved boxes visualizations to output/dialogue 4/turn 8/boxes.png ind: None
    ERROR!
    dialogue 4 turn 9
    Saved boxes visualizations to output/dialogue 4/turn 9/boxes.png ind: None
    ERROR!
    dialogue 4 turn 10
    D:\AITest\AutoStudio\model\utils.py:164: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplotlib.pyplot.figure) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam figure.max_open_warning). Consider using matplotlib.pyplot.close().
    plt.figure()
    Saved boxes visualizations to output/dialogue 4/turn 10/boxes.png ind: None
    ERROR!
    dialogue 4 turn 11
    Saved boxes visualizations to output/dialogue 4/turn 11/boxes.png ind: None
    ERROR!
    dialogue 4 turn 12
    Saved boxes visualizations to output/dialogue 4/turn 12/boxes.png ind: None
    ERROR!
    dialogue 4 turn 13
    skip
    dialogue 4 turn 14
    skip
    dialogue 4 turn 15
    skip
    single dialogue time: 1.5412306785583496
    dialogue 5 turn 1
    Saved boxes visualizations to output/dialogue 5/turn 1/boxes.png ind: None
    ERROR!
    dialogue 5 turn 2
    Saved boxes visualizations to output/dialogue 5/turn 2/boxes.png ind: None
    ERROR!
    dialogue 5 turn 3
    Saved boxes visualizations to output/dialogue 5/turn 3/boxes.png ind: None
    ERROR!
    dialogue 5 turn 4
    Saved boxes visualizations to output/dialogue 5/turn 4/boxes.png ind: None
    ERROR!
    dialogue 5 turn 5
    Saved boxes visualizations to output/dialogue 5/turn 5/boxes.png ind: None
    ERROR!
    dialogue 5 turn 6
    Saved boxes visualizations to output/dialogue 5/turn 6/boxes.png ind: None
    ERROR!
    dialogue 5 turn 7
    Saved boxes visualizations to output/dialogue 5/turn 7/boxes.png ind: None
    ERROR!
    dialogue 5 turn 8
    Saved boxes visualizations to output/dialogue 5/turn 8/boxes.png ind: None
    ERROR!
    dialogue 5 turn 9
    Saved boxes visualizations to output/dialogue 5/turn 9/boxes.png ind: None
    ERROR!
    dialogue 5 turn 10
    skip
    dialogue 5 turn 11
    skip
    dialogue 5 turn 12
    skip
    dialogue 5 turn 13
    skip
    dialogue 5 turn 14
    skip
    dialogue 5 turn 15
    skip
    single dialogue time: 1.449096441268921
    Press any key to continue . . .

全是 error ,但不知道是哪里错了。。。

请项目大佬帮忙分析指点一下,这么多人尝试,有成功跑出来的吗???

@donahowe
Copy link
Owner

感谢提醒,好像issue中很多人commit了检测模型的问题,我今天会把bug修理一下并释放完整版本

@donahowe
Copy link
Owner

Hello, I have fixed the bug. Please clone the repository again and configure the environment. Thank you for your attention.

@wikeeyang
Copy link
Author

感谢大佬的快速回复和Bug修复,点赞!

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