Open Michlozz opened 2 months ago
use C:\Users\ursus\Documents\stable-diffusion-webui\ComfyUI_windows_portable\python_embeded\python.exe -m pip
instead of pip
Same issue.. I'm not using comfy portable but the venv from the installer...
Ah... Looking at it again, this cu118
could be the problem.
I haven't tested it, but this may not be supported in cuda 11.8, which could be causing such an error.
Especially, using --fast
to utilize float8_e4m3fn
acceleration is only supported on cu124 and above.
For me the issue was solved by uninstalling stuff and reinstalling.
F:\ComfyUI_windows_portable\python_embeded\python.exe -m pip uninstall torch torchvision torchaudio F:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
I recently installed another app (deepdesktop from steam) which maybe messed up my python installation? Anyway, thanks :)
Same over here, I had to update pytorch to use cu12.4 instead of 11.8 by running:
pip install --upgrade torch torchvision torchaudio
Same over here, I had to update pytorch to use cu12.4 instead of 11.8 by running:
pip install --upgrade torch torchvision torchaudio
Don't use that command.
Visit here and scroll down and then choose proper configuration to get valid installation command. https://pytorch.org/
I have the same issue,
Tried to use the proper installation at https://pytorch.org/ but when I run the promp, it still have these errors. Not sure what I'm doing wrong here.
`
Exception Message: module 'torch' has no attribute 'float8_e4m3fn'
File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "C:\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 540, in load_checkpoint
out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings"))
File "C:\AI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 554, in load_checkpoint_guess_config
sd = comfy.utils.load_torch_file(ckpt_path)
File "C:\AI\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 34, in load_torch_file
sd = safetensors.torch.load_file(ckpt, device=device.type)
File "C:\AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\safetensors\torch.py", line 313, in load_file
result[k] = f.get_tensor(k)
## System Information
- **ComfyUI Version:** v0.2.2-85-gd985d1d
- **Arguments:** ComfyUI\main.py --windows-standalone-build
- **OS:** nt
- **Python Version:** 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
- **Embedded Python:** true
- **PyTorch Version:** 2.0.0+cu118
## Devices
- **Name:** cuda:0 NVIDIA GeForce RTX 3080 Ti : cudaMallocAsync
- **Type:** cuda
- **VRAM Total:** 12884377600
- **VRAM Free:** 11549016064
- **Torch VRAM Total:** 0
- **Torch VRAM Free:** 0
## Logs
2024-10-03 10:46:02,525 - root - INFO - Total VRAM 12288 MB, total RAM 32509 MB
2024-10-03 10:46:02,525 - root - INFO - pytorch version: 2.0.0+cu118
2024-10-03 10:46:02,541 - root - INFO - xformers version: 0.0.17+c36468d.d20230316
2024-10-03 10:46:02,541 - root - INFO - Set vram state to: NORMAL_VRAM
2024-10-03 10:46:02,541 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3080 Ti : cudaMallocAsync
2024-10-03 10:46:02,728 - root - INFO - Using xformers cross attention
2024-10-03 10:46:03,473 - root - INFO - [Prompt Server] web root: C:\AI\ComfyUI_windows_portable\ComfyUI\web
2024-10-03 10:46:03,475 - root - INFO - Adding extra search path checkpoints path/to/stable-diffusion-webui/models/Stable-diffusion
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path configs path/to/stable-diffusion-webui/models/Stable-diffusion
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path vae path/to/stable-diffusion-webui/models/VAE
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path loras path/to/stable-diffusion-webui/models/Lora
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path loras path/to/stable-diffusion-webui/models/LyCORIS
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path upscale_models path/to/stable-diffusion-webui/models/ESRGAN
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path upscale_models path/to/stable-diffusion-webui/models/RealESRGAN
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path upscale_models path/to/stable-diffusion-webui/models/SwinIR
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path embeddings path/to/stable-diffusion-webui/embeddings
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path hypernetworks path/to/stable-diffusion-webui/models/hypernetworks
2024-10-03 10:46:03,476 - root - INFO - Adding extra search path controlnet path/to/stable-diffusion-webui/models/ControlNet
2024-10-03 10:46:04,533 - root - INFO - Total VRAM 12288 MB, total RAM 32509 MB
2024-10-03 10:46:04,533 - root - INFO - pytorch version: 2.0.0+cu118
2024-10-03 10:46:04,533 - root - INFO - xformers version: 0.0.17+c36468d.d20230316
2024-10-03 10:46:04,533 - root - INFO - Set vram state to: NORMAL_VRAM
2024-10-03 10:46:04,533 - root - INFO - Device: cuda:0 NVIDIA GeForce RTX 3080 Ti : cudaMallocAsync
2024-10-03 10:46:05,198 - root - WARNING - Traceback (most recent call last):
File "C:\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1998, in load_custom_node
module_spec.loader.exec_module(module)
File "
2024-10-03 10:46:05,198 - root - WARNING - Cannot import C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node module for custom nodes: No module named 'insightface' 2024-10-03 10:46:06,864 - root - INFO - Import times for custom nodes: 2024-10-03 10:46:06,865 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py 2024-10-03 10:46:06,865 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_SimpleMath 2024-10-03 10:46:06,866 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\sdxl-recommended-res-calc 2024-10-03 10:46:06,866 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyMath 2024-10-03 10:46:06,866 - root - INFO - 0.0 seconds (IMPORT FAILED): C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node 2024-10-03 10:46:06,866 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-various 2024-10-03 10:46:06,867 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_UltimateSDUpscale 2024-10-03 10:46:06,867 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-QualityOfLifeSuit_Omar92 2024-10-03 10:46:06,867 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\Derfuu_ComfyUI_ModdedNodes 2024-10-03 10:46:06,868 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-KJNodes 2024-10-03 10:46:06,868 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\efficiency-nodes-comfyui 2024-10-03 10:46:06,868 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-IC-Light 2024-10-03 10:46:06,868 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus 2024-10-03 10:46:06,868 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux 2024-10-03 10:46:06,868 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inspire-Pack 2024-10-03 10:46:06,868 - root - INFO - 0.0 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_tinyterraNodes 2024-10-03 10:46:06,868 - root - INFO - 0.1 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_toyxyz_test_nodes 2024-10-03 10:46:06,868 - root - INFO - 0.1 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Crystools 2024-10-03 10:46:06,868 - root - INFO - 0.2 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_segment_anything 2024-10-03 10:46:06,868 - root - INFO - 0.2 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager 2024-10-03 10:46:06,868 - root - INFO - 0.4 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Impact-Pack 2024-10-03 10:46:06,868 - root - INFO - 0.5 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Easy-Use 2024-10-03 10:46:06,868 - root - INFO - 1.2 seconds: C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui 2024-10-03 10:46:06,868 - root - INFO - 2024-10-03 10:46:06,875 - root - INFO - Starting server
2024-10-03 10:46:06,876 - root - INFO - To see the GUI go to: http://127.0.0.1:8188 2024-10-03 10:46:09,321 - httpx - INFO - HTTP Request: GET https://api.openai.com/v1/models "HTTP/1.1 200 OK" 2024-10-03 10:46:09,328 - root - ERROR - [ERROR] An error occurred while retrieving information for the 'DepthAnythingPreprocessor' node. 2024-10-03 10:46:09,328 - root - ERROR - Traceback (most recent call last): File "C:\AI\ComfyUI_windows_portable\ComfyUI\server.py", line 564, in get_object_info out[x] = node_info(x) File "C:\AI\ComfyUI_windows_portable\ComfyUI\server.py", line 531, in node_info info['input'] = obj_class.INPUT_TYPES() File "C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_controlnet_aux\node_wrappers\depth_anything.py", line 8, in INPUT_TYPES ckpt_name=INPUT.COMBO( TypeError: INPUT.COMBO() got an unexpected keyword argument 'resolution'
2024-10-03 10:46:09,329 - root - ERROR - [ERROR] An error occurred while retrieving information for the 'ImageIntensityDetector' node. 2024-10-03 10:46:09,330 - root - ERROR - Traceback (most recent call last): File "C:\AI\ComfyUI_windows_portable\ComfyUI\server.py", line 564, in get_object_info out[x] = node_info(x) File "C:\AI\ComfyUI_windows_portable\ComfyUI\server.py", line 532, in node_info info['input_order'] = {key: list(value.keys()) for (key, value) in obj_class.INPUT_TYPES().items()} AttributeError: 'NoneType' object has no attribute 'items'
2024-10-03 10:46:13,116 - root - INFO - got prompt 2024-10-03 10:46:14,223 - root - ERROR - !!! Exception during processing !!! module 'torch' has no attribute 'float8_e4m3fn' 2024-10-03 10:46:14,224 - root - ERROR - Traceback (most recent call last): File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "C:\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 540, in load_checkpoint out = comfy.sd.load_checkpoint_guess_config(ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) File "C:\AI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 554, in load_checkpoint_guess_config sd = comfy.utils.load_torch_file(ckpt_path) File "C:\AI\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 34, in load_torch_file sd = safetensors.torch.load_file(ckpt, device=device.type) File "C:\AI\ComfyUI_windows_portable\python_embeded\lib\site-packages\safetensors\torch.py", line 313, in load_file result[k] = f.get_tensor(k) AttributeError: module 'torch' has no attribute 'float8_e4m3fn'
2024-10-03 10:46:14,224 - root - INFO - Prompt executed in 1.10 seconds
## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.
{"last_node_id":30,"last_link_id":56,"nodes":[{"id":3,"type":"KSampler","pos":{"0":1280,"1":100},"size":{"0":315,"1":262},"flags":{},"order":11,"mode":0,"inputs":[{"name":"model","type":"MODEL","link":28},{"name":"positive","type":"CONDITIONING","link":18},{"name":"negative","type":"CONDITIONING","link":19},{"name":"latent_image","type":"LATENT","link":54}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"properties":{"Node name for S&R":"KSampler"},"widgets_values":[157715047737901,"randomize",20,1,"euler","normal",1]},{"id":7,"type":"CLIPTextEncode","pos":{"0":212,"1":417},"size":{"0":425.27801513671875,"1":180.6060791015625},"flags":{"collapsed":true},"order":7,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":56}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[17],"slot_index":0}],"title":"CLIP Text Encode (Negative Prompt)","properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":[""],"color":"#322","bgcolor":"#533"},{"id":8,"type":"VAEDecode","pos":{"0":1620,"1":98},"size":{"0":210,"1":46},"flags":{},"order":12,"mode":0,"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":29}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"properties":{"Node name for S&R":"VAEDecode"},"widgets_values":[]},{"id":9,"type":"SaveImage","pos":{"0":1865,"1":99},"size":{"0":828.9535522460938,"1":893.8475341796875},"flags":{},"order":13,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"properties":{"Node name for S&R":"SaveImage"},"widgets_values":["ComfyUI"]},{"id":14,"type":"ControlNetApplySD3","pos":{"0":930,"1":100},"size":{"0":315,"1":186},"flags":{},"order":10,"mode":0,"inputs":[{"name":"positive","type":"CONDITIONING","link":42},{"name":"negative","type":"CONDITIONING","link":17},{"name":"control_net","type":"CONTROL_NET","link":52},{"name":"vae","type":"VAE","link":53},{"name":"image","type":"IMAGE","link":50}],"outputs":[{"name":"positive","type":"CONDITIONING","links":[18],"slot_index":0,"shape":3},{"name":"negative","type":"CONDITIONING","links":[19],"slot_index":1,"shape":3}],"properties":{"Node name for S&R":"ControlNetApplySD3"},"widgets_values":[0.4,0,1]},{"id":15,"type":"ControlNetLoader","pos":{"0":446,"1":-85},"size":{"0":431.0172119140625,"1":76.650146484375},"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[{"name":"CONTROL_NET","type":"CONTROL_NET","links":[52],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"ControlNetLoader"},"widgets_values":["instantx_flux_canny.safetensors"]},{"id":17,"type":"LoadImage","pos":{"0":220,"1":530},"size":{"0":315,"1":314.0000305175781},"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[49],"slot_index":0,"shape":3},{"name":"MASK","type":"MASK","links":null,"shape":3}],"properties":{"Node name for S&R":"LoadImage"},"widgets_values":["IMG_6241.jpg","image"]},{"id":18,"type":"Canny","pos":{"0":560,"1":530},"size":{"0":315,"1":82},"flags":{},"order":5,"mode":0,"inputs":[{"name":"image","type":"IMAGE","link":49}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[26,50],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"Canny"},"widgets_values":[0.2,0.3]},{"id":19,"type":"PreviewImage","pos":{"0":900,"1":530},"size":{"0":571.5869140625,"1":625.5296020507812},"flags":{},"order":8,"mode":0,"inputs":[{"name":"images","type":"IMAGE","link":26}],"outputs":[],"properties":{"Node name for S&R":"PreviewImage"},"widgets_values":[]},{"id":20,"type":"CheckpointLoaderSimple","pos":{"0":-402,"1":196},"size":{"0":584.3538208007812,"1":118.77709197998047},"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[28],"slot_index":0,"shape":3},{"name":"CLIP","type":"CLIP","links":[55,56],"slot_index":1,"shape":3},{"name":"VAE","type":"VAE","links":[29,53],"slot_index":2,"shape":3}],"properties":{"Node name for S&R":"CheckpointLoaderSimple"},"widgets_values":["stable-diffusion-3-medium\text_encoders\t5xxl_fp8_e4m3fn.safetensors"]},{"id":23,"type":"CLIPTextEncode","pos":{"0":210,"1":196},"size":{"0":422.84503173828125,"1":164.31304931640625},"flags":{},"order":6,"mode":0,"inputs":[{"name":"clip","type":"CLIP","link":55}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[41],"slot_index":0}],"title":"CLIP Text Encode (Positive Prompt)","properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":["anime girl smiling with long hair standing in a football arena with a single massive sword hanging from her back"],"color":"#232","bgcolor":"#353"},{"id":26,"type":"FluxGuidance","pos":{"0":570,"1":50},"size":{"0":317.4000244140625,"1":58},"flags":{},"order":9,"mode":0,"inputs":[{"name":"conditioning","type":"CONDITIONING","link":41}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[42],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"FluxGuidance"},"widgets_values":[3.5]},{"id":28,"type":"EmptySD3LatentImage","pos":{"0":930,"1":340},"size":{"0":315,"1":106},"flags":{},"order":3,"mode":0,"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[54],"slot_index":0,"shape":3}],"properties":{"Node name for S&R":"EmptySD3LatentImage"},"widgets_values":[1024,1024,1]},{"id":30,"type":"Note","pos":{"0":-180,"1":400},"size":{"0":371.18792724609375,"1":255.54762268066406},"flags":{},"order":4,"mode":0,"inputs":[],"outputs":[],"properties":{"text":""},"widgets_values":["Download the fp8 flux1-dev checkpoint here and place it under models/checkpoints. It includes the two required text encoders already so they do not need to be loaded separately. \n\nhttps://huggingface.co/Comfy-Org/flux1-dev/tree/main\n\nTips\n\n- Flux does not need a negative prompt when using cfg 1.0\n- When you make the strength of the controlnet over 0.4, the prompt has less of an effect.\n"],"color":"#432","bgcolor":"#653"}],"links":[[7,3,0,8,0,"LATENT"],[9,8,0,9,0,"IMAGE"],[17,7,0,14,1,"CONDITIONING"],[18,14,0,3,1,"CONDITIONING"],[19,14,1,3,2,"CONDITIONING"],[26,18,0,19,0,"IMAGE"],[28,20,0,3,0,"MODEL"],[29,20,2,8,1,"VAE"],[41,23,0,26,0,"CONDITIONING"],[42,26,0,14,0,"CONDITIONING"],[49,17,0,18,0,"IMAGE"],[50,18,0,14,4,"IMAGE"],[52,15,0,14,2,"CONTROL_NET"],[53,20,2,14,3,"VAE"],[54,28,0,3,3,"LATENT"],[55,20,1,23,0,"CLIP"],[56,20,1,7,0,"CLIP"]],"groups":[],"config":{},"extra":{"ds":{"scale":1.1167815779424917,"offset":[586.5877481662204,290.889660188329]}},"version":0.4}
## Additional Context
(Please add any additional context or steps to reproduce the error here)
`
Your question
I try to run some basic example with Flux Dev model. I get:
What I tried so far: 1) update Comfy via UI 2) in cmd: 2.1)
pip install --upgrade transformers
2.2)pip install --upgrade torch
2.3 )pip install --upgrade safetensors
2.4)pip install --upgrade torch torchvision torchaudio
Nothing helped. 3) I did: 3.1 )pip uninstall torch torchvision torchaudio
3.2)pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
Nothing helps. SD1.5 and SDXL checkpoints work fine.
Logs
No response
Other
No response