-
Notifications
You must be signed in to change notification settings - Fork 5
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
About environment setting #4
Comments
Additionally, provided modifier.pth is mismatching with tresnet_l model: Traceback (most recent call last): |
Hi Mark, We require this specific PyTorch version because we need to use BLIP, ML_Decoder, and CLIP to train/test PromptStealer. This PyTorch version is compatible with the environment requirements specified by all three packages, so we recommend using it. As mentioned in our README, NVIDIA provides a Docker environment that supports this setup, which you can refer to here: https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel_22-05.html The size mismatch issue may also be caused by an incorrectly configured environment. Best, |
Hi authors,
I met an environment setting issue, when i run eval_PromptStealer.py file.
I notice that your torch version required is very outdated (pytorch 1.12.0a0+8a1a93a), which is unavailable right now.
The error i encountered, when running eval_PromptStealer.py file:
Traceback (most recent call last):
File "eval_PromptStealer.py", line 199, in
main()
File "eval_PromptStealer.py", line 194, in main
evaluate_prompt_stealer(prompt_stealer, val_loader, save_path)
File "eval_PromptStealer.py", line 156, in evaluate_prompt_stealer
inferred_prompts, pred_modifiers = prompt_stealer.infer(images, lexica_dataset=val_loader.dataset)
File "eval_PromptStealer.py", line 69, in infer
modifiers = self.infer_modifiers(images, lexica_dataset)
File "eval_PromptStealer.py", line 85, in infer_modifiers
output_regular = Sig(self.modifier_detector(images.to(device))).cpu()
File "/fred/oz337/zdeng/promptStealing/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/fred/oz337/zdeng/promptStealing/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/fred/oz337/zdeng/prompt-stealing-attack-image/src/ml_decoder/models/tresnet/tresnet.py", line 205, in forward
logits = self.head(self.embeddings)
File "/fred/oz337/zdeng/promptStealing/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/fred/oz337/zdeng/promptStealing/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/fred/oz337/zdeng/prompt-stealing-attack-image/src/ml_decoder/ml_decoder/ml_decoder.py", line 167, in forward
h = self.decoder(tgt, embedding_spatial_786.transpose(0, 1)) # [embed_len_decoder, batch, 768]
File "/fred/oz337/zdeng/promptStealing/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/fred/oz337/zdeng/promptStealing/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
File "/fred/oz337/zdeng/promptStealing/lib/python3.8/site-packages/torch/nn/modules/transformer.py", line 491, in forward
seq_len = _get_seq_len(tgt, self.layers[0].self_attn.batch_first)
File "/fred/oz337/zdeng/promptStealing/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1729, in getattr
raise AttributeError(f"'{type(self).name}' object has no attribute '{name}'")
AttributeError: 'TransformerDecoderLayerOptimal' object has no attribute 'self_attn'
How do i deal with this error?
Thanks,
Mark
The text was updated successfully, but these errors were encountered: