lllyasviel / Fooocus

Focus on prompting and generating
GNU General Public License v3.0
41.02k stars 5.76k forks source link

[Bug]: Black images on debian 12 VM #3139

Closed capic2 closed 4 months ago

capic2 commented 4 months ago

Checklist

What happened?

Hello I have the issue of black images. I try to do something a bit funky, I am using proxmos with a debian 12 VM, the gpu is passed to the VM, when I want to generate an image, it is totally black and I have this message:

[Fooocus Model Management] Moving model(s) has taken 97.32 seconds /home/capic/Fooocus/modules/core.py:257: RuntimeWarning: invalid value encountered in cast x_sample = x_sample.cpu().numpy().clip(0, 255).astype(np.uint8) I tried to do the same thing with a VM with windows 11 and it works.

Any idea?

Steps to reproduce the problem

  1. Have a debian 12 proxmox VM with GPU passthrough (nvidia 1660 for me)
  2. Nvidia drivers and cuda installed in the VM
  3. Run fooocus
  4. try to generate an image
  5. The preview is black and the generated image is black

What should have happened?

Preview visible, and generated image not black

What browsers do you use to access Fooocus?

No response

Where are you running Fooocus?

None

What operating system are you using?

Debian 12 VM

Console logs

[Cleanup] Attempting to delete content of temp dir /tmp/fooocus
[Cleanup] Cleanup successful
Total VRAM 5753 MB, total RAM 11959 MB
Set vram state to: NORMAL_VRAM
Always offload VRAM
Device: cuda:0 NVIDIA GeForce GTX 1660 : native
VAE dtype: torch.float32
Using pytorch cross attention
Refiner unloaded.
IMPORTANT: You are using gradio version 3.41.2, however version 4.29.0 is available, please upgrade.
--------
Running on local URL:  http://0.0.0.0: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_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'}
Base model loaded: /media/nas/Synology_1/Fooocus/models/checkpoints/juggernautXL_v8Rundiffusion.safetensors
VAE loaded: None
Request to load LoRAs [('sd_xl_offset_example-lora_1.0.safetensors', 0.1)] for model [/media/nas/Synology_1/Fooocus/models/checkpoints/juggernautXL_v8Rundiffusion.safetensors].
Loaded LoRA [/media/nas/Synology_1/Fooocus/models/loras/sd_xl_offset_example-lora_1.0.safetensors] for UNet [/media/nas/Synology_1/Fooocus/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 1.64 seconds
Started worker with PID 409192
App started successful. Use the app with http://localhost:7865/ or 0.0.0.0:7865
[Parameters] Adaptive CFG = 7
[Parameters] CLIP Skip = 2
[Parameters] Sharpness = 2
[Parameters] ControlNet Softness = 0.25
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 4.0
[Parameters] Seed = 6172368076726148764
[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] house, highly detailed, intricate, sharp focus, cinematic, joyful, crisp detail, beautiful, charming, inspired, pretty, illuminated, rich, background epic color, radiant, professional, best, creative, positive, unique, attractive, wonderful, cute, confident, pure, perfect, focused, great, fine, awesome, bright, shiny, shining, brilliant, colorful
[Fooocus] Preparing Fooocus text #2 ...
[Prompt Expansion] house, elegant, highly detailed, extremely sharp detail, beautiful, cinematic, singular background, divine, dramatic light, friendly, cute, depicted, intricate, scenic, rich deep colors, artistic, pleasing, perfect, warm, lovely, professional, best, fair, bright, color, strong, innocent, clear, peaceful, pure, joyful, imagined, glowing, infinite
[Fooocus] Encoding positive #1 ...
[Fooocus Model Management] Moving model(s) has taken 0.17 seconds
[Fooocus] Encoding positive #2 ...
[Fooocus] Encoding negative #1 ...
[Fooocus] Encoding negative #2 ...
[Parameters] Denoising Strength = 1.0
[Parameters] Initial Latent shape: Image Space (896, 1152)
Preparation time: 3.65 seconds
[Fooocus] Preparing task 1/2 ...
[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 3557.883487701416
[Fooocus Model Management] Moving model(s) has taken 113.62 seconds
  0%|                                                                                                                                                                      | 0/30 [00:00<?, ?it/s]/home/capic/Fooocus/modules/core.py:257: RuntimeWarning: invalid value encountered in cast
  x_sample = x_sample.cpu().numpy().clip(0, 255).astype(np.uint8)
  7%|██████████▌

Additional information

image

mashb1t commented 4 months ago

Your system specs aren't supported, please check out https://github.com/lllyasviel/Fooocus?tab=readme-ov-file#minimal-requirement. I'm sorry.

capic2 commented 4 months ago

thx but it works with windows, not with linux