metercai / SimpleSDXL

Enhanced version of Fooocus for SDXL, more suitable for Chinese and Cloud
GNU General Public License v3.0
583 stars 27 forks source link

在colab中运行,报错:IndexError: list index out of range #5

Closed Van-wise closed 10 months ago

Van-wise commented 10 months ago
Set vram state to: NORMAL_VRAM
Disabling smart memory management
Device: cuda:0 Tesla T4 : native
VAE dtype: torch.float32
Using pytorch cross attention
model_type EPS
adm 0
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra keys {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'}
Refiner model loaded: /content/SimpleSDXL/models/checkpoints/DreamShaper_8_pruned.safetensors
model_type EPS
adm 2816
[Gallery] Refresh_output_list: loaded 0 images_lists.
[Topbar] Reset_context: preset=anime-->anime, theme=dark-->dark

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/SimpleSDXL/enhanced/topbar.py", line 189, in reset_context
    results +=  [gr.update(), gr.update(choices=gallery_util.output_list, value=gallery_util.output_list[0])]
IndexError: list index out of range

Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra keys {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.text_projection'}
Base model loaded: /content/SimpleSDXL/models/checkpoints/bluePencilXL_v050.safetensors
Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.5], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/content/SimpleSDXL/models/checkpoints/bluePencilXL_v050.safetensors].
Loaded LoRA [/content/SimpleSDXL/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/content/SimpleSDXL/models/checkpoints/bluePencilXL_v050.safetensors] with 788 keys at weight 0.5.
Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.5], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/content/SimpleSDXL/models/checkpoints/DreamShaper_8_pruned.safetensors].
Fooocus V2 Expansion: Vocab with 642 words.
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 1.49 seconds
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865
metercai commented 10 months ago

已修复,可以查验一下。

Van-wise commented 10 months ago
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 2.09 seconds
100% 30/30 [00:25<00:00,  1.17it/s]
Image generated with private log at: /content/SimpleSDXL/outputs/2023-12-02/log.html
Generating and saving time: 30.75 seconds
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 0.97 seconds
Backup created /content/outputs/12_02_outputs_04:27_3.zip
Total time: 131.50 seconds
[Gallery] Refresh_output_list: loaded 1 images_lists.

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/SimpleSDXL/webui.py", line 111, in <lambda>
    gallery_index.change(lambda x: [gr.update(visible=True, preview=True, value=gallery_util.get_images_from_gallery_index(x)), \
  File "/content/SimpleSDXL/enhanced/gallery.py", line 64, in get_images_from_gallery_index
    refresh_images_list(choice)
  File "/content/SimpleSDXL/enhanced/gallery.py", line 45, in refresh_images_list
    parse_html_log(choice)
  File "/content/SimpleSDXL/enhanced/gallery.py", line 139, in parse_html_log
    + f'"{text[34]}": "{text[35]}"' + '}'
IndexError: list index out of range

虽然有提示上面信息,但是还是能正常出图

metercai commented 10 months ago

是日志解析出的问题,需要把你的日志文件贴出来看看:/content/SimpleSDXL/outputs/2023-12-02/log.html

metercai commented 10 months ago

提高了日志解析的包容性,可以协助查验下