Open TheManOfficial opened 8 months ago
I'm having exactly the same problem.
Got same issue and resolved it by using those options (Got a Zephyrus G14 with RX6800S) : HSA_OVERRIDE_GFX_VERSION=10.3.0 HIP_VISIBLE_DEVICES=0 ROCR_VISIBLE_DEVICES=0 PYTORCH_HIP_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:512
Got same issue and resolved it by using those options (Got a Zephyrus G14 with RX6800S) : HSA_OVERRIDE_GFX_VERSION=10.3.0 HIP_VISIBLE_DEVICES=0 ROCR_VISIBLE_DEVICES=0 PYTORCH_HIP_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:512
This fixed the issue for me with my RX 6700 XT.
I tried with --lowvram
and the enviroment variables but I get with SDXL:
Error occurred when executing KSampler:
maximum recursion depth exceeded while calling a Python object
File "/root/ComfyUI/execution.py", line 151, in recursive_execute
comfyui-rocm | ** ComfyUI startup time: 2024-07-12 18:40:15.371113
comfyui-rocm | ** Platform: Linux
comfyui-rocm | ** Python version: 3.10.14 (main, Mar 21 2024, 16:45:28) [GCC]
comfyui-rocm | ** Python executable: /usr/bin/python3
comfyui-rocm | ** ComfyUI Path: /root/ComfyUI
comfyui-rocm | ** Log path: /root/comfyui.log
comfyui-rocm |
comfyui-rocm | Prestartup times for custom nodes:
comfyui-rocm | 0.4 seconds: /root/ComfyUI/custom_nodes/ComfyUI-Manager
comfyui-rocm |
comfyui-rocm | Total VRAM 512 MB, total RAM 47379 MB
comfyui-rocm | pytorch version: 2.1.2+rocm6.1.3
comfyui-rocm | Set vram state to: LOW_VRAM
comfyui-rocm | Device: cuda:0 AMD Radeon Graphics : native
comfyui-rocm | Using split optimization for cross attention
comfyui-rocm | ### Loading: ComfyUI-Manager (V2.46.3)
comfyui-rocm | ### ComfyUI Revision: 1 [29c2e267] | Released on '2024-07-12'
comfyui-rocm | got prompt
comfyui-rocm | model_type EPS
comfyui-rocm | Using split attention in VAE
comfyui-rocm | Using split attention in VAE
comfyui-rocm | Requested to load SDXLClipModel
comfyui-rocm | Loading 1 new model
comfyui-rocm | Requested to load SDXL
comfyui-rocm | Loading 1 new model
comfyui-rocm | loading in lowvram mode 64.0
0%| | 0/5 [00:00<?, ?it/s]/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py:599: UserWarning: Should have ta>=t0 but got ta=7.727652072906494 and t0=14.61464.
comfyui-rocm | warnings.warn(f"Should have ta>=t0 but got ta={ta} and t0={self._start}.")
0%| | 0/5 [00:09<?, ?it/s]
comfyui-rocm | !!! Exception during processing!!! maximum recursion depth exceeded while calling a Python object
comfyui-rocm | Traceback (most recent call last):
comfyui-rocm | File "/root/ComfyUI/execution.py", line 151, in recursive_execute
comfyui-rocm | output_data, output_ui = get_output_data(obj, input_data_all)
comfyui-rocm | File "/root/ComfyUI/execution.py", line 81, in get_output_data
comfyui-rocm | return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
comfyui-rocm | File "/root/ComfyUI/execution.py", line 74, in map_node_over_list
comfyui-rocm | results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
comfyui-rocm | File "/root/ComfyUI/nodes.py", line 1373, in sample
comfyui-rocm | return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
comfyui-rocm | File "/root/ComfyUI/nodes.py", line 1343, in common_ksampler
comfyui-rocm | samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
comfyui-rocm | File "/root/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/animatediff/sampling.py", line 410, in motion_sample
comfyui-rocm | return orig_comfy_sample(model, noise, *args, **kwargs)
comfyui-rocm | File "/root/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 22, in informative_sample
comfyui-rocm | raise e
comfyui-rocm | File "/root/ComfyUI/custom_nodes/ComfyUI-Impact-Pack/modules/impact/sample_error_enhancer.py", line 9, in informative_sample
comfyui-rocm | return original_sample(*args, **kwargs) # This code helps interpret error messages that occur within exceptions but does not have any impact on other operations.
comfyui-rocm | File "/root/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet/adv_control/control_reference.py", line 47, in refcn_sample
comfyui-rocm | return orig_comfy_sample(model, *args, **kwargs)
comfyui-rocm | File "/root/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet/adv_control/utils.py", line 112, in uncond_multiplier_check_cn_sample
comfyui-rocm | return orig_comfy_sample(model, *args, **kwargs)
comfyui-rocm | File "/root/ComfyUI/comfy/sample.py", line 43, in sample
comfyui-rocm | samples = sampler.sample(noise, positive, negative, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
comfyui-rocm | File "/root/ComfyUI/comfy/samplers.py", line 801, in sample
comfyui-rocm | return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
comfyui-rocm | File "/root/ComfyUI/comfy/samplers.py", line 703, in sample
comfyui-rocm | return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
comfyui-rocm | File "/root/ComfyUI/comfy/samplers.py", line 690, in sample
comfyui-rocm | output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
comfyui-rocm | File "/root/ComfyUI/comfy/samplers.py", line 669, in inner_sample
comfyui-rocm | samples = sampler.sample(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
comfyui-rocm | File "/root/ComfyUI/comfy/samplers.py", line 574, in sample
comfyui-rocm | samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
comfyui-rocm | File "/usr/lib64/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
comfyui-rocm | return func(*args, **kwargs)
comfyui-rocm | File "/root/ComfyUI/comfy/k_diffusion/sampling.py", line 578, in sample_dpmpp_sde
comfyui-rocm | x_2 = x_2 + noise_sampler(sigma_fn(t), sigma_fn(s)) * s_noise * su
comfyui-rocm | File "/root/ComfyUI/comfy/k_diffusion/sampling.py", line 124, in __call__
comfyui-rocm | return self.tree(t0, t1) / (t1 - t0).abs().sqrt()
comfyui-rocm | File "/root/ComfyUI/comfy/k_diffusion/sampling.py", line 95, in __call__
comfyui-rocm | w = torch.stack([tree(t0.cpu().float(), t1.cpu().float()).to(t0.dtype).to(t0.device) for tree in self.trees]) * (self.sign * sign)
comfyui-rocm | File "/root/ComfyUI/comfy/k_diffusion/sampling.py", line 95, in <listcomp>
comfyui-rocm | w = torch.stack([tree(t0.cpu().float(), t1.cpu().float()).to(t0.dtype).to(t0.device) for tree in self.trees]) * (self.sign * sign)
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/derived.py", line 169, in __call__
comfyui-rocm | out = self._interval(t, tb, return_U=return_U, return_A=return_A)
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py", line 638, in __call__
comfyui-rocm | intervals = self._last_interval._loc(ta, tb)
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py", line 275, in _loc
comfyui-rocm | trampoline.trampoline(self._loc_inner(ta, tb, out))
comfyui-rocm | File "/usr/lib/python3.10/site-packages/trampoline/__init__.py", line 40, in trampoline
comfyui-rocm | raise exception
comfyui-rocm | File "/usr/lib/python3.10/site-packages/trampoline/__init__.py", line 26, in trampoline
comfyui-rocm | res = next(stack[-1])
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py", line 296, in _loc_inner
comfyui-rocm | self._split(tb)
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py", line 328, in _split
comfyui-rocm | self._left_child._split(midway)
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py", line 328, in _split
comfyui-rocm | self._left_child._split(midway)
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py", line 328, in _split
comfyui-rocm | self._left_child._split(midway)
comfyui-rocm | [Previous line repeated 953 more times]
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py", line 323, in _split
comfyui-rocm | self._split_exact(0.5 * (self._end + self._start))
comfyui-rocm | File "/usr/lib/python3.10/site-packages/torchsde/_brownian/brownian_interval.py", line 336, in _split_exact
comfyui-rocm | generator = np.random.SeedSequence(entropy=self._top._entropy,
comfyui-rocm | File "bit_generator.pyx", line 315, in numpy.random.bit_generator.SeedSequence.__init__
comfyui-rocm | File "bit_generator.pyx", line 390, in numpy.random.bit_generator.SeedSequence.get_assembled_entropy
comfyui-rocm | File "bit_generator.pyx", line 148, in numpy.random.bit_generator._coerce_to_uint32_array
comfyui-rocm | File "bit_generator.pyx", line 140, in numpy.random.bit_generator._coerce_to_uint32_array
comfyui-rocm | File "bit_generator.pyx", line 79, in numpy.random.bit_generator._int_to_uint32_array
comfyui-rocm | RecursionError: maximum recursion depth exceeded while calling a Python object
comfyui-rocm |
comfyui-rocm | Prompt executed in 14.12 seconds
This is not identical to the other post with the same title.
I get this error when running any stable diffusion XL model, and a similar (but shorter) error when I run any 1.0 model. It throws the error directly after loading the model.
Error I get for all XL models: Very long, uploaded to pastebin.
Error I get for all 1.5/1.0 models:
PC Specs: OS: RedHat Enterprise Linux 9.2 Python Version: 3.9.18 CPU: Ryzen 5 3600 GPU: RX6600XT ROCm Version: 6.0
Installed Libraries:
Steps to reproduce:
Full log (excluding above errors):
I've tried all of the relevant fixes in issue #1142 but none of them proved helpful.