card's code snippet using 1024 model and not 512 ("PixArt-alpha/PixArt-Sigma-XL-2-1024-MS"), if we fix it it will crash when generating validaton images

#3
by humanfornow - opened

This code (using the correct model size, 512) ...

import torch
from diffusers import Transformer2DModel, PixArtSigmaPipeline

device = torch.device("cuda:3" if torch.cuda.is_available() else "cpu")
weight_dtype = torch.float16

pipe = PixArtSigmaPipeline.from_pretrained(
    "PixArt-alpha/PixArt-Sigma-XL-2-512-MS",    #<---------------  
    torch_dtype=weight_dtype,
    use_safetensors=True,
)
pipe.to(device)

# Enable memory optimizations.
# pipe.enable_model_cpu_offload()

prompt = "A small cactus with a happy face in the Sahara desert."
image = pipe(prompt).images[0]
image.save("./catcus.png")

generates the following error

Entry Not Found for url: https://huggingface.co./PixArt-alpha/PixArt-Sigma-XL-2-512-MS/resolve/main/model_index.json.

Sign up or log in to comment