carson-katri / dream-textures

Stable Diffusion built-in to Blender
GNU General Public License v3.0
7.83k stars 427 forks source link

GPU error #735

Closed shiyuze112 closed 10 months ago

shiyuze112 commented 1 year ago

Description

RuntimeError: OutOfMemoryError('CUDA out of memory. Tried to allocate 20.00 MiB. GPU 0 has a total capacty of 2.00 GiB of which 0 bytes is free. Of the allocated memory 1.68 GiB is allocated by PyTorch, and 40.94 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF')

Steps to Reproduce

genetate>>>RuntimeError: OutOfMemoryError('CUDA out of memory. Tried to allocate 20.00 MiB. GPU 0 has a total capacty of 2.00 GiB of which 0 bytes is free. Of the allocated memory 1.68 GiB is allocated by PyTorch, and 40.94 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF')

Expected Behavior

Clicking to run the texture failed and this error occurred.

Addon Version

Windows (CUDA)

GPU

NVIDIA

shiyuze112 commented 1 year ago

Please tell me whether this is an error in the file or poor computer performance

carson-katri commented 1 year ago

Looks like your GPU only has 2GB of VRAM. You can enable CPU Offload under Advanced > Memory Optimizations. However, this still may not be enough to fit on your GPU.

shiyuze112 commented 1 year ago

看起来您的 GPU 只有 2GB 的显存。您可以在“高级>内存优化”下启用 CPU 卸载。但是,这可能仍然不足以适合您的 GPU。

Hello, I changed my computer, and solved the GPU problem, but I encountered the following error during the implementation of the texture, the progress bar can be read to the end, but the AI image is not generated

》》》 EOFError You have disabled the safety checker for <class 'dream_textures. generator_process.actions.depth_to_image.depth_to_image.. GeneratorPipeline' > by passing safety_checker=None . Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strong ly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve a nalyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/dif fusers/pul1/254. You have loaded a UNet with 5 input channels, whereas by default, <class 'dream_textures.generator_process.actions. depth_to_image
.depth_to_image..GeneratorPipeline' > assumes that pipeline. unet`has 9 input channels: 4 for num_channels_latents , 1f or num_channels_mask , and 4 for num_channels_masked_image . If you did not intend to modify this behavior, please check whethe r you have loaded the right checkpoint. C:\Users\zz\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\dream_textures.python_dependencies\diffusers\models\ cross_attention. py:30: FutureWarning: Importing from cross_attention is deprecated. Please import from diffusers. models. attention processor instead. deprecate( 100%||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||25/25 [09:53<0:00,23.74s/it] C:\Users\zz\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\dream_textures. python_dependencies\diffusers\pipelin es\pipeline_utils. py:1375: RuntimeWarning: invalid value enc countered in cast images = (images * 255). round().astype("uint8")

》》》 What is the cause of this, can you help me solve it, thank you very much

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] commented 10 months ago

This issue was closed because it has been inactive for 7 days since being marked as stale.