Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: Invalid metadata in README.md. - "widget" must be an array #260

Open
tiandaoyuxi opened this issue Mar 3, 2025 · 0 comments

Comments

@tiandaoyuxi
Copy link

Saved to output\jiz-lbt\optimizer.pt
Traceback (most recent call last):
File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\utils_http.py", line 406, in hf_raise_for_status
response.raise_for_status()
File "D:\ai-toolkit\venv\Lib\site-packages\requests\models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://huggingface.co/api/validate-yaml

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\hf_api.py", line 9220, in _validate_yaml
hf_raise_for_status(response)
File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\utils_http.py", line 460, in hf_raise_for_status
raise _format(BadRequestError, message, response) from e
huggingface_hub.errors.BadRequestError: (Request ID: Root=1-67c5246c-45e0872c12b7522c7b42114e;570cc213-f736-4c9c-a9a5-0f57cc58f523)

Bad request:
"widget" must be an array

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\ai-toolkit\venv\Lib\site-packages\gradio\queueing.py", line 624, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\gradio\route_utils.py", line 323, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\gradio\blocks.py", line 2018, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\gradio\blocks.py", line 1567, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\anyio_backends_asyncio.py", line 2441, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\anyio_backends_asyncio.py", line 943, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\gradio\utils.py", line 846, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\flux_train_ui.py", line 230, in start_training
job.run()
File "D:\ai-toolkit\jobs\ExtensionJob.py", line 22, in run
process.run()
File "D:\ai-toolkit\jobs\process\BaseSDTrainProcess.py", line 2116, in run
self.push_to_hub(
File "D:\ai-toolkit\jobs\process\BaseSDTrainProcess.py", line 2152, in push_to_hub
api.upload_folder(
File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\hf_api.py", line 1524, in _inner
return fn(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\hf_api.py", line 4658, in upload_folder
add_operations = self._prepare_upload_folder_additions(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\hf_api.py", line 9159, in _prepare_upload_folder_additions
self._validate_yaml(
File "D:\ai-toolkit\venv\Lib\site-packages\huggingface_hub\hf_api.py", line 9224, in _validate_yaml
raise ValueError(f"Invalid metadata in README.md.\n{message}") from e
ValueError: Invalid metadata in README.md.

  • "widget" must be an array
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant