krita-ai-diffusion icon indicating copy to clipboard operation
krita-ai-diffusion copied to clipboard

krita 里面绘制是一团黑?

Open Myoko opened this issue 1 year ago • 13 comments

krita 里面绘制是一团黑? 有一段时间没用 今天更新1.27.1 发现在krita 里面生成不了内容了 comfyui 更新到最新了 生成的内容一团黑 PM

Myoko avatar Nov 05 '24 15:11 Myoko

Why are you trying to fill a white background?

Acly avatar Nov 06 '24 10:11 Acly

Why are you trying to fill a white background?

Even if it is not a white background, the generated content is pitch black.

Myoko avatar Nov 06 '24 11:11 Myoko

I think you have an active empty layer? You might need to fill that empty layer with some color

dauwpe avatar Nov 06 '24 13:11 dauwpe

I think you have an active empty layer? You might need to fill that empty layer with some color. I think you have an active empty layer? You might need to fill that empty layer with some color.

Somehow, a black mass is always generated in the painting area, without any details. 1girl

Very strange! No matter what I do, the content generated by the SD1.5 model or the XL model is always pitch black. 1girlll

Myoko avatar Nov 06 '24 15:11 Myoko

You get a black image also without selection? ("Generate" mode)

I remember there was some issue with black images on latest macOS version.

Acly avatar Nov 06 '24 16:11 Acly

You get a black image also without selection? ("Generate" mode)

I remember there was some issue with black images on latest macOS version.

yeah!! Always get a black image

Myoko avatar Nov 07 '24 03:11 Myoko

#783

Acly avatar Nov 07 '24 08:11 Acly

783

I tried all the solutions in issue #783! None of them worked! No matter how the image is generated, it is always a black image! I hope this issue can be resolved.

Myoko avatar Nov 13 '24 13:11 Myoko

Hmm, have you seen this? https://www.reddit.com/r/comfyui/comments/1c2pnqh/help_all_of_my_outputs_are_pure_black/

No idea if this is useful though

dauwpe avatar Nov 14 '24 11:11 dauwpe

When krita generates an image, comfyui displays the following message I'm not sure exactly what is causing this! but I'm sure I'm not missing any of the required model files!

C:\Content\ComfyUI\comfy\utils.py:700: RuntimeWarning: invalid value encountered in cast images = [Image.fromarray(np.clip(255. * image.movedim(0, -1).cpu().numpy(), 0, 255).astype(np.uint8)) for image in samples] Unloading models for lowram load. 1 models unloaded. Loading 1 new model loaded completely 0.0 159.55708122253418 True Requested to load BaseModel Loading 1 new model loaded completely 0.0 1639.406135559082 True Unloading models for lowram load. 1 models unloaded. Loading 1 new model loaded completely 0.0 159.55708122253418 True C:\Content\ComfyUI\custom_nodes\comfyui-tooling-nodes\nodes.py:73: RuntimeWarning: invalid value encountered in cast image = Image.fromarray(np.clip(array, 0, 255).astype(np.uint8)) Prompt executed in 55.41 seconds got prompt Requested to load CLIPVisionModelProjection Loading 1 new model loaded completely 0.0 1208.09814453125 True Requested to load BaseModel Requested to load ControlNet Loading 2 new models loaded completely 0.0 1639.406135559082 True loaded completely 0.0 689.0852355957031 True Requested to load BaseModel Loading 1 new model Prompt executed in 8.17 seconds

Myoko avatar Nov 20 '24 14:11 Myoko

It was OK on sd1.5, but image that generated by flux is black. My computer system is Windows. krita ai plugin version is 1.29.2. What's more, the images generated by flux are also fine on comfyui.

xingBaGan avatar Jan 02 '25 14:01 xingBaGan

I don't know if this is a problem with comfyui or with krita-ai-diffusion! In my local tests, generating images with sd1.5 or sdxl is all black.

Myoko avatar Jan 03 '25 07:01 Myoko

You provided zero information to go by. To help troubleshoot further, please provide: ℹ️

  • ComfyUI Version
  • Krita Version
  • Krita AI Plugin Version
  • Graphics Card Model
  • Operating System

1. GPU Investigation: 🧐

It's just a hunch. ComfyUI may struggle with VAE models using half-precision floating point numbers (FP32). Potential solution:

  • Command Line Switch: Use the --fp32-vae command line switch when launching ComfyUI to force full precision for the VAE. 🚀
  • Config File Edit: Modify config.json located in AppData\Roaming\ComfyUI. Add "fp32_vae" and set it to true. Save and restart ComfyUI. fp32_vae (bool)

Here's an example of how to modify it:

{
    "some auto-generated": "stuff",
    "basePath": "C:\\Users\\<your username>\\Documents\\ComfyUI",
    "end of auto-generated" : "stuff",
    
    "fp32_vae": true
}

2. Mac Considerations (If Applicable): 🤔

(🌀 totally random link I found) Check this Civitai article for Mac-specific issues: https://civitai.com/articles/11106/fixing-black-images-in-comfyui-on-mac-m1m2-pytorch-260-and-mps 🍎

3. Debugging Steps:

  • Simplify Graph: Remove complex nodes to isolate the issue. 📊
  • VAE Experimentation: Try different VAE models.

Good Luck!

bmFicg avatar Apr 03 '25 19:04 bmFicg