mashb1t / Fooocus

Focus even better on prompting and generating
GNU General Public License v3.0
196 stars 33 forks source link

[Bug]: History Log link gives error when Output folder has been changed #18

Closed OldUncleMike closed 6 months ago

OldUncleMike commented 6 months ago

Prerequisites

Describe the problem

Hi

Thanks for the excellent UI. Minor irritation:

History Log link gives error: { "detail": "File not allowed: C:/AI/Outputs/Fooocus-mash/2024-02-25/log.html." } when Output folder has been changed.

The file quoted in the error does open happily when address from error is copied pasted into the browser.

The log files opens when the output folder has not been moved.

Browser is Edge on Windows 11

The behaviour is the same on both yours mashb1t and lllyasviel

It is not a problem, probably some permissions issue, wanted you to be aware of it.

Thanks Mike

Full console log output

C:\AI\Fooocus-Mash>.\python_embeded\python.exe -s Fooocus\entry_with_update.py
Fast-forward merge
Update succeeded.
[System ARGV] ['Fooocus\\entry_with_update.py']
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Fooocus version: 2.1.865 (mashb1t)
Total VRAM 6144 MB, total RAM 65461 MB
Set vram state to: NORMAL_VRAM
Always offload VRAM
Device: cuda:0 NVIDIA GeForce RTX 2060 : native
VAE dtype: torch.float32
Using pytorch cross attention
Refiner unloaded.
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 pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
Base model loaded: C:\AI\Models\checkpoints\juggernautXL_v8Rundiffusion.safetensors
Request to load LoRAs [['sd_xl_offset_example-lora_1.0.safetensors', 0.1], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [C:\AI\Models\checkpoints\juggernautXL_v8Rundiffusion.safetensors].
Loaded LoRA [C:\AI\models\loras\sd_xl_offset_example-lora_1.0.safetensors] for UNet [C:\AI\Models\checkpoints\juggernautXL_v8Rundiffusion.safetensors] with 788 keys at weight 0.1.
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 0.49 seconds
Started worker with PID 19428
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865
[Parameters] Adaptive CFG = 7
[Parameters] Sharpness = 2
[Parameters] ControlNet Softness = 0.25
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 4.0
[Parameters] Seed = 8759536093732494450
[Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[Parameters] Steps = 30 - 15
[Fooocus] Initializing ...
[Fooocus] Loading models ...
Refiner unloaded.
[Fooocus] Processing prompts ...
[Fooocus] Preparing Fooocus text #1 ...
[Prompt Expansion] steelorchid, intricate, elegant, highly detailed, wonderful colors, sweet, sharp focus, professional composition, cute, magical ambient, dynamic background, cool light, modern, advanced, thought, full color, beautiful, creative, positive, perfect, pure, attractive, artistic, loving, delicate, pretty, friendly, best, successful, romantic, peaceful, unique, vibrant
[Fooocus] Encoding positive #1 ...
[Fooocus Model Management] Moving model(s) has taken 0.21 seconds
[Fooocus] Encoding negative #1 ...
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (1024, 1024)
Preparation time: 2.14 seconds
[Sampler] refiner_swap_method = joint
[Sampler] sigma_min = 0.0291671771556139, sigma_max = 14.614643096923828
Requested to load SDXL
Loading 1 new model
loading in lowvram mode 3113.787935256958
[Fooocus Model Management] Moving model(s) has taken 5.45 seconds
100%|██████████████████████████████████████████████████████████████████████████████████| 30/30 [00:28<00:00,  1.06it/s]
Requested to load AutoencoderKL
Loading 1 new model
[Fooocus Model Management] Moving model(s) has taken 0.40 seconds
Image generated with private log at: C:\AI\Outputs\Fooocus-mash\2024-02-25\log.html
Generating and saving time: 41.37 seconds
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
Total time: 43.55 seconds
[Fooocus Model Management] Moving model(s) has taken 0.67 seconds

Version

Fooocus version: 2.1.865 (mashb1t)

Where are you running Fooocus?

Locally

Operating System

Windows 11 build 26058

What browsers are you seeing the problem on?

Chrome, Microsoft Edge

mashb1t commented 6 months ago

This should be fixed wih https://github.com/lllyasviel/Fooocus/pull/2332, will include it in the main branch of this repository. Please double-check.

OldUncleMike commented 6 months ago

That is wonderful. Thank you for the quick fix Keep up the good work.

Mike