When adding the Offload Anything node (only having the model connected) set to target_device CPU (if i set it to cuda:0 it works) and run the workflow it throws this error on the CLIP Text Encode node or the KSampler node depending on the workflow.
[ERROR] !!! Exception during processing !!! device(type='cpu')
[ERROR] Traceback (most recent call last):
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_patcher.py", line 2023, in partially_load
self.load(device_to, dirty=dirty)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_patcher.py", line 1799, in load
pin_state = self.model.dynamic_pins[self.load_device]
KeyError: device(type='cpu')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\pinokio\api\ComfyUI-DevTest.git\app\execution.py", line 536, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\execution.py", line 336, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\custom_nodes\comfyui-lora-manager\py\metadata_collector\metadata_hook.py", line 171, in async_map_node_over_list_with_metadata
results = await original_map_node_over_list(
File "D:\pinokio\api\ComfyUI-DevTest.git\app\execution.py", line 310, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\execution.py", line 298, in process_inputs
result = f(**inputs)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\nodes.py", line 1620, in sample
return common_ksampler(model, noise_seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise, disable_noise=disable_noise, start_step=start_at_step, last_step=end_at_step, force_full_denoise=force_full_denoise)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\nodes.py", line 1550, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\sample.py", line 74, in sample
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)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\samplers.py", line 1444, in sample
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)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\samplers.py", line 1334, in sample
return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\samplers.py", line 1316, in sample
output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\samplers.py", line 1233, in outer_sample
self.inner_model, self.conds, self.loaded_models = comfy.sampler_helpers.prepare_sampling(self.model_patcher, noise.shape, self.conds, self.model_options)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\sampler_helpers.py", line 186, in prepare_sampling
return executor.execute(model, noise_shape, conds, model_options=model_options, force_full_load=force_full_load, force_offload=force_offload)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\sampler_helpers.py", line 201, in _prepare_sampling
comfy.model_management.load_models_gpu([model] + models, memory_required=memory_required, minimum_memory_required=minimum_memory_required, force_full_load=force_full_load)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_management.py", line 938, in load_models_gpu
loaded_model.model_load(lowvram_model_memory, force_patch_weights=force_patch_weights)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_management.py", line 726, in model_load
self.model_use_more_vram(use_more_vram, force_patch_weights=force_patch_weights)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_management.py", line 754, in model_use_more_vram
return self.model.partially_load(self.device, extra_memory, force_patch_weights=force_patch_weights)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_patcher.py", line 2025, in partially_load
self.detach()
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_patcher.py", line 1245, in detach
self.unpatch_model(self.offload_device, unpatch_weights=unpatch_all)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_patcher.py", line 2009, in unpatch_model
self.partially_unload_ram(1e32)
File "D:\pinokio\api\ComfyUI-DevTest.git\app\comfy\model_patcher.py", line 1977, in partially_unload_ram
pin_state = self.model.dynamic_pins[self.load_device]
KeyError: device(type='cpu')
When adding the Offload Anything node (only having the model connected) set to target_device CPU (if i set it to cuda:0 it works) and run the workflow it throws this error on the CLIP Text Encode node or the KSampler node depending on the workflow.
I'm using windows 11 and ComfyUI v0.23.0
I have a RTX 4060TI and a AMD Ryzen 5 3600X 6-Core Processor
Here is a minimalistic workflow where it crashes on the KSampler in CPU mode
sdxl_simple_example (2).json