-
Notifications
You must be signed in to change notification settings - Fork 7
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
AttributeError: 'NoneType' object has no attribute 'get' #17
Comments
Hi! For the textual attack, you can directly load the CLIP text encoder as
the target model, which is the same as the one used in
StableDiffusionInpaintPipeline.
…On Tue, 15 Oct 2024 at 23:45, xln-tj ***@***.***> wrote:
Good a working! I try out this link:
https://huggingface.co/benjamin-paine/stable-diffusion-v1-5-inpainting.
Run python : python textual_attack.py -s 7867 -i 1000 -n 10. There is a
error:
Namespace(random_seed=7867, iteration=1000, candicate_number=10)
batch_size: 512
control_init: N q V w Y S V P H b D X p P d k h x E p
filter_cand: true
gbda_deterministic: true
n_advs: 1000
n_cands: 10
n_steps: 1000
topk: 256
Loading pipeline components...: 43%|█████▌ | 3/7 [00:00<00:00, 10.68it/s]
Traceback (most recent call last):
File "/home/2025/MMA-Diffusion/src/textual_attack.py", line 427, in <module>
main(args)
File "/home/2025/MMA-Diffusion/src/textual_attack.py", line 321, in main
pipe_inpaint = StableDiffusionInpaintPipeline.from_pretrained(
File "/home/2025/anaconda3/envs/sd/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1093, in from_pretrained
loaded_sub_model = load_sub_model(
File "/home/2025/anaconda3/envs/sd/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 467, in load_sub_model
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
File "/home/2025/anaconda3/envs/sd/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2805, in from_pretrained
state_dict = load_state_dict(resolved_archive_file)
File "/home/2025/anaconda3/envs/sd/lib/python3.10/site-packages/transformers/modeling_utils.py", line 460, in load_state_dict
if metadata.get("format") not in ["pt", "tf", "flax"]:
AttributeError: 'NoneType' object has no attribute 'get'
Process finished with exit code 1
How can i solve the problem? Thank you!
—
Reply to this email directly, view it on GitHub
<#17>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AM7HELTN3WXZC3Z3VHD5G4DZ3U2DNAVCNFSM6AAAAABP7O6A32VHI2DSMVQWIX3LMV43ASLTON2WKOZSGU4DSMJZGMYTMMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hello! I know the problem. The checkpoints's link is "git clone https://www.modelscope.cn/AI-ModelScope/stable-diffusion-inpainting.git". It is normal running!As fllows: Is this the right way to run? `python -u /home/2025/MMA-Diffusion/src/textual_attack.py Loading pipeline components...: 0%| | 0/7 [00:00<?, ?it/s] |
Good a working! I try out this link: https://huggingface.co/benjamin-paine/stable-diffusion-v1-5-inpainting. Run python :
python textual_attack.py -s 7867 -i 1000 -n 10
. There is a error:How can i solve the problem? Thank you!
The text was updated successfully, but these errors were encountered: