Skip to content

SDXL slow #3

Open
Open

Description

@SaymanDotNet

I tried using the SDXL. 2 models.
1: hassakuXLIllustrious_v22.safetensors
won't load.

Loading model......
Maybe you are using: SDXL
Unhandled exception. System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   at StableDiffusionSharp.ModelLoader.SafetensorsLoader.LoadSafetensors(Module module, String fileName, String maybeAddHeaderInBlock) in D:\temp\StableDiffusionSharp\StableDiffusionSharp\ModelLoader\SafetensorsLoader.cs:line 133
   at StableDiffusionSharp.ModelLoader.ModelLoader.LoadModel(Module module, String fileName, String maybeAddHeaderInBlock) in D:\temp\StableDiffusionSharp\StableDiffusionSharp\ModelLoader\ModelLoader.cs:line 19
   at StableDiffusionSharp.Modules.SDModel.LoadModel(String modelPath, String vaeModelPath, String vocabPath, String mergesPath) in D:\temp\StableDiffusionSharp\StableDiffusionSharp\Modules\SDModel.cs:line 107
   at StableDiffusionSharp.StableDiffusion.LoadModel(String modelPath, String vaeModelPath, String vocabPath, String mergesPath) in D:\temp\StableDiffusionSharp\StableDiffusionSharp\StableDiffusion.cs:line 50
   at StableDiffusionDemo_Console.Program.Main(String[] args) in D:\temp\StableDiffusionSharp\StableDiffusionDemo_Console\Program.cs:line 40

line 40:
sd.LoadModel(sdModelPath);
sdModelPath is correct!

  1. dreamshaperXL_alpha2Xl10.safetensors
    It seems to work, but I didn't wait the result. The frame generation speed is about 20 times slower than in Python in standard webui or, for example, sd.reForge.

Activity

  1. IntptrMax commented on May 12, 2025

    @IntptrMax
    Owner
    1. In hassakuXLIllustrious_v22.safetensors, it seems that “conditioner.embedders.0.transformer.text_model.embeddings.position_ids” block is missing. The block sometimes is like a tensor with shape of [1,77], float16 and value from 0 to 76, but sometimes can be other values.

    Image

    1. In SDXL, it will take about 9G VRAM for 1024x1024 image, maybe your VRAM is less than that, so it will takes a lot of time. Because in SD-webui or other GUIs have low-VRAM mode, so it will take less VRAM. Low-VRAM mode will be added later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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