KEMBAR78
The validation image is black when displayed in the tensorboard · Issue #9558 · huggingface/diffusers · GitHub
Skip to content

The validation image is black when displayed in the tensorboard #9558

@todochenxi

Description

@todochenxi

Describe the bug

when I use the script train_text_to_image_lora_sdxl.py to train my lora, the validation image in tensorboard is black .... just like this
image

Reproduction

the code in train_text_to_image_lora_sdxl

        phase_name = "test" if is_final_validation else "validation"
        if tracker.name == "tensorboard":
            np_images = np.stack([np.asarray(img) for img in images])
            tracker.writer.add_images(phase_name, np_images, epoch, dataformats="NHWC")
        if tracker.name == "wandb":
            tracker.log(
                {
                    phase_name: [
                        wandb.Image(image, caption=f"{i}: {args.validation_prompt}") for i, image in enumerate(images)
                    ]
                }
            )

Logs

No response

System Info

diffusers-cli env
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.3.1+cu121 with CUDA 1201 (you have 2.4.1+cu121)
Python 3.12.4 (you have 3.12.3)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details

Copy-and-paste the text below in your GitHub issue and FILL OUT the two last points.

  • 🤗 Diffusers version: 0.31.0.dev0
  • Platform: Linux-6.8.0-40-generic-x86_64-with-glibc2.35
  • Running on Google Colab?: No
  • Python version: 3.12.3
  • PyTorch version (GPU?): 2.4.1+cu121 (True)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Huggingface_hub version: 0.25.1
  • Transformers version: 4.38.0
  • Accelerate version: 0.34.2
  • PEFT version: 0.7.0
  • Bitsandbytes version: 0.44.0
  • Safetensors version: 0.4.5
  • xFormers version: 0.0.27
  • Accelerator: NVIDIA GeForce RTX 3090, 24576 MiB
    NVIDIA GeForce RTX 3090, 24576 MiB
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Who can help?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions