Unable to use text_encoder via PyTorch

#3
by v12h - opened

CyberRealistic Pony v12.5

I'm able to generate beautiful images out of the box with this model. But I run into issues when using the text_encoder at the pytorch level.

There appears to be NaN values in text_encoder 1.

NaN detection:
image.png

Logs of NaN detection:
image.png

text_encoder outputs tensor of NaN's:
image.png
image.png

Summary:

  1. I'm extending the 77 token limit by chunking the tokens and encoding per chunk.
  2. When I encode per chunk I get a tensor that is the correct shape, but filled with NaN's.
  3. I've replaced the encoder with the default one and the default one "works", but the output is bad.
  4. I'm using this model from: CyberrealisticPony from CivIt
    via:
    image.png
  5. text_encoder2 works as expected.
  6. I have tried using fp32, same result.
  7. I have double/triple/quadruple checked that my download is not corrupt.

I could be conceptually missing something. Maybe if text_encoder 1 is modified in a way that doesn't let me use it like the default text_encoder for the SDXL pipeline?

image.png

CORRUPTED: text_model.encoder.layers.11.self_attn.k_proj.weight has 589824 NaN values

Are NaN values common in models trained like CyberRealistic Pony v12.5?

Sign up or log in to comment