Closed dhiraj-salian closed 5 days ago
* CheckpointLoaderSimple CheckpointLoaderSimple.0:
- Value not in list: ckpt_name: 'artium_v20Turboboosted.safetensors' not in (list of length 35)
This error means ComfyUI can't find the model 'artium_v20Turboboosted.safetensors'. You may put it in the wrong directory.
To print all the models found by ComfyUI:
from comfy_script.runtime import load
load("comfyui")
from comfy_script.runtime.nodes import Checkpoints
print(list(Checkpoints))
I have verified the location. When executing main.py, it is not finding the model:
[<Checkpoints.Anything_V3_0: 'Anything-V3.0.ckpt'>, <Checkpoints.Realistic_Vision_V5_1_fp16_no_ema: 'Realistic_Vision_V5.1_fp16-no-ema.safetensors'>, <Checkpoints.Realistic_Vision_V6_0_NV_B1_fp16: 'Realistic_Vision_V6.0_NV_B1_fp16.safetensors'>, <Checkpoints.anyloraCheckpoint_bakedvaeBlessedFp16: 'anyloraCheckpoint_bakedvaeBlessedFp16.safetensors'>, <Checkpoints.aura_flow_0_1: 'aura_flow_0.1.safetensors'>, <Checkpoints.cardosAnime_v10: 'cardosAnime_v10.safetensors'>, <Checkpoints.cosxl: 'cosxl.safetensors'>, <Checkpoints.cosxl_edit: 'cosxl_edit.safetensors'>, <Checkpoints.counterfeitV30_v30: 'counterfeitV30_v30.safetensors'>, <Checkpoints.dreamshaperXL_v21TurboDPMSDE: 'dreamshaperXL_v21TurboDPMSDE.safetensors'>, <Checkpoints.dreamshaper_8: 'dreamshaper_8.safetensors'>, <Checkpoints.hunyuan_dit_1_0: 'hunyuan_dit_1.0.safetensors'>, <Checkpoints.hunyuan_dit_1_1: 'hunyuan_dit_1.1.safetensors'>, <Checkpoints.hunyuan_dit_1_2: 'hunyuan_dit_1.2.safetensors'>, <Checkpoints.juggernautXL_v9Rundiffusionphoto2: 'juggernautXL_v9Rundiffusionphoto2.safetensors'>, <Checkpoints.picxReal_10: 'picxReal_10.safetensors'>, <Checkpoints.realvisxlV40_v40Bakedvae: 'realvisxlV40_v40Bakedvae.safetensors'>, <Checkpoints.revAnimated_v2Rebirth: 'revAnimated_v2Rebirth.safetensors'>, <Checkpoints.sd3_medium: 'sd3_medium.safetensors'>, <Checkpoints.sd3_medium_incl_clips: 'sd3_medium_incl_clips.safetensors'>, <Checkpoints.sd3_medium_incl_clips_t5xxlfp8: 'sd3_medium_incl_clips_t5xxlfp8.safetensors'>, <Checkpoints.sd_xl_base_1_0: 'sd_xl_base_1.0.safetensors'>, <Checkpoints.sd_xl_refiner_1_0: 'sd_xl_refiner_1.0.safetensors'>, <Checkpoints.sd_xl_turbo_1_0: 'sd_xl_turbo_1.0.safetensors'>, <Checkpoints.sd_xl_turbo_1_0_fp16: 'sd_xl_turbo_1.0_fp16.safetensors'>, <Checkpoints.stable_audio_open_1_0: 'stable_audio_open_1.0.safetensors'>, <Checkpoints.stable_cascade_stage_b: 'stable_cascade_stage_b.safetensors'>, <Checkpoints.stable_cascade_stage_c: 'stable_cascade_stage_c.safetensors'>, <Checkpoints.stage_a: 'stage_a.safetensors'>, <Checkpoints.v1_5_pruned_emaonly: 'v1-5-pruned-emaonly.safetensors'>, <Checkpoints.v1_5_pruned: 'v1-5-pruned.safetensors'>, <Checkpoints.v2_1_768_ema_pruned: 'v2-1_768-ema-pruned.ckpt'>, <Checkpoints.wd_illusion_fp16: 'wd-illusion-fp16.safetensors'>]
But when executing image.py within the same directory, it is able to find the model:
[<Checkpoints.Anything_V3_0: 'Anything-V3.0.ckpt'>, <Checkpoints.Realistic_Vision_V5_1_fp16_no_ema: 'Realistic_Vision_V5.1_fp16-no-ema.safetensors'>, <Checkpoints.Realistic_Vision_V6_0_NV_B1_fp16: 'Realistic_Vision_V6.0_NV_B1_fp16.safetensors'>, <Checkpoints.anyloraCheckpoint_bakedvaeBlessedFp16: 'anyloraCheckpoint_bakedvaeBlessedFp16.safetensors'>, <Checkpoints.artium_v20Turboboosted: 'artium_v20Turboboosted.safetensors'>, <Checkpoints.aura_flow_0_1: 'aura_flow_0.1.safetensors'>, <Checkpoints.cardosAnime_v10: 'cardosAnime_v10.safetensors'>, <Checkpoints.cosxl: 'cosxl.safetensors'>, <Checkpoints.cosxl_edit: 'cosxl_edit.safetensors'>, <Checkpoints.counterfeitV30_v30: 'counterfeitV30_v30.safetensors'>, <Checkpoints.dreamshaperXL_v21TurboDPMSDE: 'dreamshaperXL_v21TurboDPMSDE.safetensors'>, <Checkpoints.dreamshaper_8: 'dreamshaper_8.safetensors'>, <Checkpoints.hunyuan_dit_1_0: 'hunyuan_dit_1.0.safetensors'>, <Checkpoints.hunyuan_dit_1_1: 'hunyuan_dit_1.1.safetensors'>, <Checkpoints.hunyuan_dit_1_2: 'hunyuan_dit_1.2.safetensors'>, <Checkpoints.juggernautXL_v9Rundiffusionphoto2: 'juggernautXL_v9Rundiffusionphoto2.safetensors'>, <Checkpoints.picxReal_10: 'picxReal_10.safetensors'>, <Checkpoints.realvisxlV40_v40Bakedvae: 'realvisxlV40_v40Bakedvae.safetensors'>, <Checkpoints.revAnimated_v2Rebirth: 'revAnimated_v2Rebirth.safetensors'>, <Checkpoints.sd3_medium: 'sd3_medium.safetensors'>, <Checkpoints.sd3_medium_incl_clips: 'sd3_medium_incl_clips.safetensors'>, <Checkpoints.sd3_medium_incl_clips_t5xxlfp8: 'sd3_medium_incl_clips_t5xxlfp8.safetensors'>, <Checkpoints.sd_xl_base_1_0: 'sd_xl_base_1.0.safetensors'>, <Checkpoints.sd_xl_refiner_1_0: 'sd_xl_refiner_1.0.safetensors'>, <Checkpoints.sd_xl_turbo_1_0: 'sd_xl_turbo_1.0.safetensors'>, <Checkpoints.sd_xl_turbo_1_0_fp16: 'sd_xl_turbo_1.0_fp16.safetensors'>, <Checkpoints.stable_audio_open_1_0: 'stable_audio_open_1.0.safetensors'>, <Checkpoints.stable_cascade_stage_b: 'stable_cascade_stage_b.safetensors'>, <Checkpoints.stable_cascade_stage_c: 'stable_cascade_stage_c.safetensors'>, <Checkpoints.stage_a: 'stage_a.safetensors'>, <Checkpoints.v1_5_pruned_emaonly: 'v1-5-pruned-emaonly.safetensors'>, <Checkpoints.v1_5_pruned: 'v1-5-pruned.safetensors'>, <Checkpoints.v2_1_768_ema_pruned: 'v2-1_768-ema-pruned.ckpt'>, <Checkpoints.wd_illusion_fp16: 'wd-illusion-fp16.safetensors'>]
That's weird. Did you put the model in the same directory as others? Or it's in a separate directory?
This is my folder structure. The models, main.py and image.py are at same hierarchy in same directory:
Not sure but I feel it has something to do with asynchronous loading.
There is a bug in the comfyui package. If you name the script main.py
, it won't use the current directory as the base path. A simple workaround is to rename your main.py
to other names, or use the official ComfyUI.
Related code: https://github.com/hiddenswitch/ComfyUI/blob/3e91f98aa22fb620f339e0602f059bfa1fb5bf6d/comfy/cmd/folder_paths.py#L83-L84
Thank you @Chaoses-Ib
The workaround of renaming main.py helps resolve the issue.
this is resolved upstream @dhiraj-salian thanks for reporting the issue
I am trying to write a script using comfyscript to generate images. When the comfyscript is called using function it throws the following error:
Steps to reproduce:
def main(name: str): prompt = "Dark, misty forest with twisted tree branches like skeletal fingers reaching towards a full moon hanging low in the sky, casting an eerie glow on a worn dirt path that winds through the trees. The air is heavy with the scent of damp earth and decaying leaves. In the distance, a faint light flickers from a lantern hung outside a small, weathered cottage, its windows like empty eyes staring back at you." image.generate_image(prompt, name)
if name == "main": main("story1")
from comfy_script.runtime import load, Workflow
load("comfyui")
from comfy_script.runtime.nodes import ( CheckpointLoaderSimple, CLIPTextEncode, EmptyLatentImage, KSampler, VAEDecode, SaveImage, )
negative_prompt = "ugly, deformed, noisy, blurry, noisy, low contrast (((bad anatomy))) watermark, bad hands, (((incomplete limbs))) ((((looking at viewer))))(((bad anatomy))) ((exaggerated anatomy))"
def generate_image(positive_prompt: str, output: str): global negative_prompt
if name == "main": prompt = "Dark, misty forest with twisted tree branches like skeletal fingers reaching towards a full moon hanging low in the sky, casting an eerie glow on a worn dirt path that winds through the trees. The air is heavy with the scent of damp earth and decaying leaves. In the distance, a faint light flickers from a lantern hung outside a small, weathered cottage, its windows like empty eyes staring back at you." generate_image(prompt, "story1")