flowtyone / ComfyUI-Flowty-CRM

This is a custom node that lets you use Convolutional Reconstruction Models right from ComfyUI.
Other
128 stars 7 forks source link

cuda oom problem #16

Closed amnesicloud closed 3 months ago

amnesicloud commented 3 months ago

hi,

I'm having problem with with this workflow:https://www.reddit.com/r/comfyui/comments/1bf7tv1/i_created_crm_custom_nodes_for_comfyui/

and I tried to split the process, but I'm stuck on pixel-diffusion process (first step), so I'm guessing splitting process won't work for me,(I've also tried a suggested solution in the comment, but it doesn't work as well, https://www.reddit.com/r/comfyui/comments/1bf7tv1/comment/kv2nt8d/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)

do you have any suggestion for me?

thanks

The error goes as follow:

DDIM Sampler: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 32/32 [00:26<00:00, 1.20it/s] ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "/home/yunz03/.jupyter/ComfyUI/execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "/home/yunz03/.jupyter/ComfyUI/execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "/home/yunz03/.jupyter/ComfyUI/execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "/home/yunz03/.jupyter/ComfyUI/custom_nodes/ComfyUI-Flowty-CRM/init.py", line 102, in sample stage1_images = self.initialized_poser.i2i( File "/home/yunz03/.jupyter/ComfyUI/custom_nodes/ComfyUI-Flowty-CRM/crmlib/libs/sample.py", line 165, in i2i x_sample = model.decode_first_stage(samples_ddim) File "/home/yunz03/.jupyter/ComfyUI/custom_nodes/ComfyUI-Flowty-CRM/crmlib/imagedream/ldm/interface.py", line 204, in decode_first_stage return self.vae_model.decode(z) File "/home/yunz03/.jupyter/ComfyUI/custom_nodes/ComfyUI-Flowty-CRM/crmlib/imagedream/ldm/models/autoencoder.py", line 90, in decode dec = self.decoder(z) File "/root/miniconda3/envs/yunz/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/root/miniconda3/envs/yunz/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl return forward_call(args, kwargs) File "/home/yunz03/.jupyter/ComfyUI/custom_nodes/ComfyUI-Flowty-CRM/crmlib/imagedream/ldm/modules/diffusionmodules/model.py", line 697, in forward h = self.up[i_level].block[i_block](h, temb) File "/root/miniconda3/envs/yunz/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/root/miniconda3/envs/yunz/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl return forward_call(args, *kwargs) File "/home/yunz03/.jupyter/ComfyUI/custom_nodes/ComfyUI-Flowty-CRM/crmlib/imagedream/ldm/modules/diffusionmodules/model.py", line 129, in forward h = nonlinearity(h) File "/home/yunz03/.jupyter/ComfyUI/custom_nodes/ComfyUI-Flowty-CRM/crmlib/imagedream/ldm/modules/diffusionmodules/model.py", line 44, in nonlinearity return x torch.sigmoid(x) torch.cuda.OutOfMemoryError: Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 8.86 GiB Requested : 448.00 MiB Device limit : 14.58 GiB Free (according to CUDA): 9.62 MiB PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB

Prompt executed in 57.92 seconds

flowtyone commented 3 months ago

Hi, I have provided workflows in the low-vram directory, try to use them

amnesicloud commented 3 months ago

Hi, I have provided workflows in the low-vram directory, try to use them

it worked, my main problem was that my vram was occupied by other process, used fuser command to find out that process.

in the step 4, it seems to me that you are using absolute path, that caused some error, but easy to fix.

Thanks!