Skip to content

Loading SD models throws "OSError Access Violation" if TEMP path contains non-ASCII chars (i.e. in username) #2339

Description

@A-Sverdrup

Describe the Issue
Trying to load different SD models, koboldcpp-nocuda always fails with the following error:

Additional Information:

(using starter-pack-v2.kcppt as an example, but this also happened to every other image gen model I tried)

ImageGen Init - Load Model: C:\ai-models\z_image_turbo-Q4_0.gguf
With Custom VAE: C:\ai-models\ae.safetensors
With Custom Clip-1 Model: C:\ai-models\Qwen3-4B-Instruct-2507-Q4_K_S.gguf
Flash Attention is enabled
Backend assignment: "CLIP=CPU"

Swap to Diffusion Model Path:C:\ai-models\z_image_turbo-Q4_0.gguf
Try read vocab from C:\Users\╨Р╨╗╤М╤В\AppData\Local\Temp\_MEI201042/embd_res/qwen2_merges_utf8_c_str.embd
Traceback (most recent call last):
  File "koboldcpp.py", line 12536, in <module>
    main(launch_args=parser.parse_args(),default_args=parser.parse_args([]))
  File "koboldcpp.py", line 11068, in main
    kcpp_main_process(args,global_memory,using_gui_launcher)
  File "koboldcpp.py", line 11887, in kcpp_main_process
    loadok = sd_load_model(imgmodel,imgvae,imgt5xxl,imgclip1,imgclip2,imgphotomaker,imgupscaler,imgaudiovae)
  File "koboldcpp.py", line 2557, in sd_load_model
    ret = handle.sd_load_model(inputs)
OSError: exception: access violation reading 0x000000C3FF1F0000
[18420] Failed to execute script 'koboldcpp' due to unhandled exception!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions