huggingface / huggingface/diffusers
accelerator.init_trackers error when try with a custom object such as list
- Dominant language
- Python
- Stars
- 34.5k
- Forks
- 7.3k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 91
Description
### Describe the bug
I set multiple prompts with nargs for argument "--validation_prompt " in "train_dreambooth.py":
` parser.add_argument(
"--validation_prompt",
type=str,
default=["A photo of sks dog in a bucket", "A sks cat wearing a coat"],
nargs="*",
help="A prompt that is used during validation to verify that the model is learning.",
)`
but an error occured at ` if accelerator.is_main_process:
tracker_name = "dreambooth-lora"
accelerator.init_trackers(tracker_name, config=vars(args))` :
"ValueError: value should be one of int, float, str, bool, or torch.Tensor"
Is it because tensorboard only support basic Python types and PyTorch tensors but not a custom object such as list?
so how to visualize when has custom object such as list or argument with nargs?
### Reproduction
set the follow argument in "train_dreambooth.py" or other similar demos such as "train_amused.py":
` parser.add_argument(
"--validation_prompt",
type=str,
default=["A photo of sks dog in a bucket", "A sks cat wearing a coat"],
nargs="*",
help="A prompt that is used during validation to verify that the model is learning.",
)`
error occured at ` if accelerator.is_main_process:
tracker_name = "dreambooth-lora"
accelerator.init_trackers(tracker_name, config=vars(args))` with
"ValueError: value should be one of int, float, str, bool, or torch.Tensor"
### Logs
```shell
```
### System Info
- 🤗 Diffusers version: 0.33.0.dev0
- Platform: Linux-6.8.0-55-generic-x86_64-with-glibc2.39
- Running on Google Colab?: No
- Python version: 3.10.11
- PyTorch version (GPU?): 2.7.1+cu126 (True)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Huggingface_hub version: 0.30.1
- Transformers version: 4.52.4
- Accelerate version: 1.8.1
- PEFT version: 0.15.2
- Bitsandbytes version: 0.45.4
- Safetensors version: 0.5.3
- xFormers version: 0.0.27.post2
- Accelerator: NVIDIA GeForce RTX 3090, 24576 MiB
- Using GPU in script?:
- Using distributed or parallel set-up in script?:
### Who can help?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.