uwidev / sd_extension-prompt_formatter

Prompt formatter extension for automatic1111's stable diffusion web-ui
GNU Affero General Public License v3.0
95 stars 9 forks source link

[Issue]: AttributeError: 'ExtraNetworksPageLyCORIS' object has no attribute 'get_sort_keys' #8

Closed Woisek closed 1 year ago

Woisek commented 1 year ago

When starting automatic, I get the following error:

python_server_full_path: I:\Super SD 2.0\automatic\extensions\Auto-Photoshop-StableDiffusion-Plugin\server/python_server 11:26:39-704645 INFO Libraries loaded 11:26:40-185359 ERROR Module load: I:\Super SD 2.0\automatic\extensions\sd_extension-prompt_formatter\scripts\format_ui.py: SyntaxError ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ I:\Super SD 2.0\automatic\modules\script_loading.py:13 in load_module │ │ │ │ 12 │ try: │ │ > 13 │ │ module_spec.loader.exec_module(module) │ │ 14 │ except Exception as e: │ │ in exec_module:879 │ │ │ │ ... 1 frames hidden ... │ │ in source_to_code:947 │ │ in _call_with_frames_removed:241 │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ I:\Super SD 2.0\automatic\extensions\sd_extension-prompt_formatter\scripts\format_ui.py:107 │ │ <<<<<<< Updated upstream │ │ ▲ │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ SyntaxError: invalid syntax 11:26:40-430792 INFO Running extension preloading 11:26:40-805781 INFO Loading UI theme: name=black-orange style=Auto Create LRU cache (max_size=16) for preprocessor results. ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ I:\Super SD 2.0\automatic\launch.py:149 in │ │ │ │ 148 │ │ > 149 instance = start_server(immediate=True, server=None) │ │ 150 while True: │ │ │ │ I:\Super SD 2.0\automatic\launch.py:129 in start_server │ │ │ │ 128 else: │ │ > 129 server = server.webui() │ │ 130 if args.profile: │ │ │ │ I:\Super SD 2.0\automatic\webui.py:276 in webui │ │ │ │ 275 start_common() │ │ > 276 start_ui() │ │ 277 load_model() │ │ │ │ I:\Super SD 2.0\automatic\webui.py:204 in start_ui │ │ │ │ 203 startup_timer.record("scripts before_ui_callback") │ │ > 204 shared.demo = modules.ui.create_ui() │ │ 205 startup_timer.record("ui") │ │ │ │ I:\Super SD 2.0\automatic\modules\ui.py:360 in create_ui │ │ │ │ 359 from modules import ui_extra_networks │ │ > 360 extra_networks_ui = ui_extra_networks.create_ui(extra_networks_ui, extra_net │ │ 361 with gr.Row().style(equal_height=False): │ │ │ │ I:\Super SD 2.0\automatic\modules\ui_extra_networks.py:214 in createui │ │ │ │ 213 with gr.Tab(page.title, id=page.title.lower().replace(" ", "")): │ │ > 214 page_elem = gr.HTML(page.create_html(ui.tabname)) │ │ 215 page_elem.change(fn=lambda: None, _js=f'() => refreshExtraNetworks("{tab │ │ │ │ I:\Super SD 2.0\automatic\modules\ui_extra_networks.py:100 in create_html │ │ │ │ 99 """ for subdir in subdirs]) │ │ > 100 for item in self.list_items(): │ │ 101 metadata = item.get("metadata") │ │ │ │ I:\Super SD 2.0\automatic\extensions-builtin\a1111-sd-webui-lycoris\ui_extra_networks_lyco.py:33 in list_items │ │ │ │ 32 "metadata": json.dumps(lyco_on_disk.metadata, indent=4) if lyco_on_disk. │ │ > 33 "sort_keys": {'default': index, **self.get_sort_keys(lyco_on_disk.filena │ │ 34 } │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ AttributeError: 'ExtraNetworksPageLyCORIS' object has no attribute 'get_sort_keys' Drücken Sie eine beliebige Taste . . .

Any ideas? Previously, I also noted that the button was gone.

uwidev commented 1 year ago

What else are you using besides prompt formatted? I'm speculating that there's an extension conflict, and it might be that it might not even be related to this extension at all, since I never touched my script doesn't touch anything related to Lycoris.

Try disabling all extensions except built-in and prompt formatter. Does it still run? If so, it might be another extension playing weird with prompt formatter, or it might not be prompt formatter at all and that other extension. Give this a try and let me know how it goes.

I also noticed you're using the Photoshop. It might be that as well.

Woisek commented 1 year ago

What else are you using besides prompt formatted?

Zwischenablagebild

Try disabling all extensions except built-in and prompt formatter. Does it still run?

Nope. Zwischenablagebild (1) Zwischenablagebild (2)

I also noticed you're using the Photoshop. It might be that as well.

I don't think so, because I have this extension for a while now and prompt formatter worked without a problem. Any more ideas? 🤔

uwidev commented 1 year ago

Is this automatic1111's webui, vlad, or something else?

On Sun, Jun 4, 2023, 2:42 PM Woisek @.***> wrote:

What else are you using besides prompt formatted?

[image: Zwischenablagebild] https://user-images.githubusercontent.com/122026301/243211760-00a0f1b5-4f8f-435c-aaee-8319d454d755.png

Try disabling all extensions except built-in and prompt formatter. Does it still run?

Nope. [image: Zwischenablagebild (1)] https://user-images.githubusercontent.com/122026301/243213983-ae78300e-364b-4954-8267-6249f8746a86.png [image: Zwischenablagebild (2)] https://user-images.githubusercontent.com/122026301/243214006-41c0b51c-61d9-4483-87cd-f6b9965a0366.png

I also noticed you're using the Photoshop. It might be that as well.

I don't think so, because I have this extension for a while now and prompt formatter worked without a problem. Any more ideas? 🤔

— Reply to this email directly, view it on GitHub https://github.com/uwidev/sd_extension-prompt_formatter/issues/8#issuecomment-1575744853, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNCER5NOXL2PWIOQ3EG4OLXJT6NXANCNFSM6AAAAAAYZ3MWXY . You are receiving this because you commented.Message ID: @.***>

Woisek commented 1 year ago

It's Vlads repo.

uwidev commented 1 year ago

You mentioned that the prompt formatter worked before without any problem. I'm assuming it was v0.3.3?

I will test the extension on vlad when I'm available.

Woisek commented 1 year ago

You mentioned that the prompt formatter worked before without any problem. I'm assuming it was v0.3.3?

I really can't say anymore what version this was. I noticed it only, because I wanted to format a prompt, but the button was gone and I thought that Vlad had removed something again (he did an update previously).

But for your info: This is what I'm getting now:

python_server_full_path: I:\Super SD 2.0\automatic\extensions\Auto-Photoshop-StableDiffusion-Plugin\server/python_server 22:55:57-875419 INFO Libraries loaded 22:55:58-413980 ERROR Module load: I:\Super SD 2.0\automatic\extensions\sd_extension-prompt_formatter\scripts\format_ui.py: SyntaxError ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ I:\Super SD 2.0\automatic\modules\script_loading.py:13 in load_module │ │ │ │ 12 │ try: │ │ > 13 │ │ module_spec.loader.exec_module(module) │ │ 14 │ except Exception as e: │ │ in exec_module:879 │ │ │ │ ... 1 frames hidden ... │ │ in source_to_code:947 │ │ in _call_with_frames_removed:241 │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ I:\Super SD 2.0\automatic\extensions\sd_extension-prompt_formatter\scripts\format_ui.py:107 │ │ <<<<<<< Updated upstream │ │ ▲ │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ SyntaxError: invalid syntax 22:55:58-677909 INFO Running extension preloading 22:55:59-032178 INFO Loading UI theme: name=black-orange style=Auto

Maybe this helps ...

uwidev commented 1 year ago

Guess what, it works on my end. 😔

I did a fresh install of vlad and the extension, it works.

Can you take a look at I:\Super SD 2.0\automatic\extensions\sd_extension-prompt_formatter\scripts\format_ui.py, specifically at line 107. Can you send me what you see around there? Like say, from lines 99 to 114 or something.

Here's what it should look like: image

Woisek commented 1 year ago

Strange, it looks like this 😧: Zwischenablagebild (3)

uwidev commented 1 year ago

Something went wrong when it was trying to update. Just delete the entire extension and re-download it.

On Mon, Jun 5, 2023, 2:08 AM Woisek @.***> wrote:

Strange, it looks like this 😧: [image: Zwischenablagebild (3)] https://user-images.githubusercontent.com/122026301/243307135-f36609ec-2623-4db4-bf21-8979e0430c7c.png

— Reply to this email directly, view it on GitHub https://github.com/uwidev/sd_extension-prompt_formatter/issues/8#issuecomment-1576419741, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACNCER7PELV3IBGYNYC5GF3XJWOZNANCNFSM6AAAAAAYZ3MWXY . You are receiving this because you commented.Message ID: @.***>

Woisek commented 1 year ago

OK, this seems to fixed it ... the button is here again. 🙂 I'll report if anything doesn't fit, still.