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

[Bug]: Error when applying metadata (a1111) with LoRAs turned off. #2545

Closed
4 of 5 tasks
poor7 opened this issue Mar 17, 2024 · 1 comment · Fixed by #2551
Closed
4 of 5 tasks

[Bug]: Error when applying metadata (a1111) with LoRAs turned off. #2545

poor7 opened this issue Mar 17, 2024 · 1 comment · Fixed by #2551
Labels
bug Something isn't working triage This needs an (initial) review
Milestone

Comments

@poor7
Copy link

poor7 commented Mar 17, 2024

Checklist

  • The issue has not been resolved by following the troubleshooting guide
  • The issue exists on a clean installation of Fooocus
  • The issue exists in the current version of Fooocus
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

Error when applying metadata (a1111) with LoRAs turned off.
snap2

Steps to reproduce the problem

  1. Turn off the LoRAs switch.
  2. Create an image with metadata saved in a1111 format.
  3. Save the image.
  4. View metadata and apply it.
    snap

What should have happened?

Metadata had to be imported.

What browsers do you use to access Fooocus?

Google Chrome

Where are you running Fooocus?

Cloud (Google Colab)

What operating system are you using?

No response

Console logs

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "/content/Fooocus/webui.py", line 637, in trigger_metadata_import
    parsed_parameters = metadata_parser.parse_json(parameters)
  File "/content/Fooocus/modules/meta_parser.py", line 385, in parse_json
    lora_name, lora_hash, lora_weight = lora.split(': ')
ValueError: not enough values to unpack (expected 3, got 1)

Additional information

No response

@poor7 poor7 added bug Something isn't working triage This needs an (initial) review labels Mar 17, 2024
@poor7 poor7 changed the title [Bug]: Error when applying metadata (a1111) with lore turned off. [Bug]: Error when applying metadata (a1111) with LoRAs turned off. Mar 17, 2024
@mashb1t mashb1t added this to the 2.3.0 milestone Mar 17, 2024
@mashb1t
Copy link
Collaborator

mashb1t commented Mar 17, 2024

Fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This needs an (initial) review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants