Skip to content

[Bug]: Custom thumbnails for custom styles are not working #3955

@XDM-Inc

Description

@XDM-Inc

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?

I am trying to make some custom thumbnails for my custom styles i have made i have tried a couple of things and none of them work. some include

  1. renaming my custom style and 128x128 image the same name (also tried 256,512 and also 1024) and placing them in the same directory "sdxl_styles"(also tried the image in the samples folder)
  2. converting the image to base64 and adding it to the .json file as so
    "image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//.....etc etc

3.tried multiple base64 encoders

but my custom styles just show blank box. if all of this is the wrong way of doing it can you tell me how do i correctly go about it? i am trying to make photos with text explaining what prompts are in my style for quick reference instead of going to the file and opening it. the style shows up and works but is no preview like the system ones

if needed i am running fedora linux

Steps to reproduce the problem

  1. make a custom style and preview thumbnail and rename them the same (or base64 method )
  2. place them in the correct location
  3. start fooocus (no errors in terminal)
  4. custom styles show and work but do not have any thumbnails

What should have happened?

hovering over the custom style should have a thumbnail just like the built in styles.

What browsers do you use to access Fooocus?

Google Chrome

Where are you running Fooocus?

Locally

What operating system are you using?

Fedora Linux 41

Console logs

[System ARGV] ["/home/Admin/AI_training/Fooocus - mashb1t's 1-Up Edition/launch.py", '--disable-image-log', '--disable-analytics', '--disable-offload-from-vram', '--disable-in-browser']
Python 3.10.11 (main, May  7 2023, 19:26:31) [Clang 16.0.3 ]
Fooocus version: 2.6.5 (mashb1t)
[Cleanup] Attempting to delete content of temp dir /tmp/fooocus
[Cleanup] Cleanup successful
amdgpu.ids: No such file or directory
amdgpu.ids: No such file or directory
Total VRAM 24560 MB, total RAM 63859 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 AMD Radeon Graphics : native
VAE dtype: torch.float32
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --attention-split
[System ARGV] ["/home/Admin/AI_training/Fooocus - mashb1t's 1-Up Edition/launch.py", '--disable-image-log', '--disable-analytics', '--disable-offload-from-vram', '--disable-in-browser']
Python 3.10.11 (main, May  7 2023, 19:26:31) [Clang 16.0.3 ]
Fooocus version: 2.6.5 (mashb1t)
Refiner unloaded.
[Cleanup] Attempting to delete content of temp dir /tmp/fooocus
[Cleanup] Cleanup successful
Running on local URL:  http://127.0.0.1:7865

To create a public link, set `share=True` in `launch()`.
model_type EPS
UNet ADM Dimension 2816
Using split attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using split attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'}
left over keys: dict_keys(['cond_stage_model.clip_l.transformer.text_model.embeddings.position_ids'])
Base model loaded: Admin/AI_training/Models/SDXL/juggernautXL_v8Rundiffusion.safetensors
VAE loaded: None
Request to load LoRAs [('sd_xl_offset_example-lora_1.0.safetensors', 0.1)] for model [Admin/AI_training/Models/SDXL/juggernautXL_v8Rundiffusion.safetensors].
Loaded LoRA [Admin/AI_training/Models/Lora/sd_xl_offset_example-lora_1.0.safetensors] for UNet [Admin/AI_training/Models/SDXL/juggernautXL_v8Rundiffusion.safetensors] with 788 keys at weight 0.1.
Fooocus V2 Expansion: Vocab with 642 words.
/home/Admin/AI_training/Fooocus - mashb1t's 1-Up Edition/venv/lib/python3.10/site-packages/torch/_utils.py:831: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly.  To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
  return self.fget.__get__(instance, owner)()
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 0.26 seconds
Started worker with PID 2808498
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis needs an (initial) review

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions