Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Errno 11001] getaddrinfo failed怎么解决 ? #11

Open
Bonjir opened this issue Nov 3, 2024 · 19 comments
Open

[Errno 11001] getaddrinfo failed怎么解决 ? #11

Bonjir opened this issue Nov 3, 2024 · 19 comments

Comments

@Bonjir
Copy link

Bonjir commented Nov 3, 2024

我开了comfy,端口号也没错,出现下面的报错是什么原因
start comfy
Traceback (most recent call last):
File "C:\Users\86198\anaconda3\envs\everyonenobel2\lib\site-packages\websocket_http.py", line 145, in _get_addrinfo_list
addrinfo_list = socket.getaddrinfo(
File "C:\Users\86198\anaconda3\envs\everyonenobel2\lib\socket.py", line 967, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Download\Browser Download\EveryoneNobel-main\src\server.py", line 96, in generate_image_by_prompt_and_image
ws, server_address, client_id = open_websocket_connection(comfy_server_address)
File "D:\Download\Browser Download\EveryoneNobel-main\src\server.py", line 17, in open_websocket_connection
ws.connect("ws://{}/ws?clientId={}".format(server_address, client_id))
File "C:\Users\86198\anaconda3\envs\everyonenobel2\lib\site-packages\websocket_core.py", line 248, in connect
self.sock, addrs = connect(url, self.sock_opt, proxy_info(**options),
File "C:\Users\86198\anaconda3\envs\everyonenobel2\lib\site-packages\websocket_http.py", line 112, in connect
addrinfo_list, need_tunnel, auth = _get_addrinfo_list(
File "C:\Users\86198\anaconda3\envs\everyonenobel2\lib\site-packages\websocket_http.py", line 157, in _get_addrinfo_list
raise WebSocketAddressException(e)
websocket._exceptions.WebSocketAddressException: [Errno 11001] getaddrinfo failed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Download\Browser Download\EveryoneNobel-main\main.py", line 83, in
main(args.name, args.subject, args.content, args.image_path, args.comfy_server_address)
File "D:\Download\Browser Download\EveryoneNobel-main\main.py", line 49, in main
output_filename = prompt_image_to_image(
File "D:\Download\Browser Download\EveryoneNobel-main\src\server.py", line 86, in prompt_image_to_image
file_name = generate_image_by_prompt_and_image(
File "D:\Download\Browser Download\EveryoneNobel-main\src\server.py", line 103, in generate_image_by_prompt_and_image
ws.close()
UnboundLocalError: local variable 'ws' referenced before assignment

@16131zzzzzzzz
Copy link
Owner

Need your command

@Bonjir
Copy link
Author

Bonjir commented Nov 4, 2024

Need your command

comfy 启动:python main.py --disable-cuda-malloc --use-split-cross-attention --cpu
(我没有nvida显卡,只能用cpu启动)
everyonenobel启动
python main.py --name "somebody" --subject "2024 nobel prize" --content "Do nothing" --image_path "resource/test/myphoto.png" --comfy_server_address "http://127.0.0.1:8188"
python=3.10.15

@16131zzzzzzzz
Copy link
Owner

remove http://

@Bonjir
Copy link
Author

Bonjir commented Nov 4, 2024

谢谢,这个有用。
但是之后又遇到了报错:(服务器端)
Starting server

To see the GUI go to: http://127.0.0.1:8188
got prompt
Error handling request
Traceback (most recent call last):
File "C:\Users\86198\anaconda3\envs\everyonenobel2\lib\site-packages\aiohttp\web_protocol.py", line 477, in _handle_request
resp = await request_handler(request)
File "C:\Users\86198\anaconda3\envs\everyonenobel2\lib\site-packages\aiohttp\web_app.py", line 559, in handle
return await handler(request)
File "C:\Users\86198\anaconda3\envs\everyonenobel2\lib\site-packages\aiohttp\web_middlewares.py", line 117, in impl
return await handler(request)
File "D:\Download\Browser Download\ComfyUI-aki\ComfyUI-aki-v1.3\server.py", line 47, in cache_control
response: web.Response = await handler(request)
File "D:\Download\Browser Download\ComfyUI-aki\ComfyUI-aki-v1.3\server.py", line 474, in post_prompt
valid = execution.validate_prompt(prompt)
File "D:\Download\Browser Download\ComfyUI-aki\ComfyUI-aki-v1.3\execution.py", line 626, in validate_prompt
class
= nodes.NODE_CLASS_MAPPINGS[prompt[x]['class_type']]
KeyError: 'LayerUtility: CropByMask'
在看了flexxy对comfy的commit之后,我将execution.py里面validate_promt()稍作了些改动,现在服务端又开始报错,似乎没有改变cropbymask节点缺失的问题。
got prompt
invalid prompt: {'type': 'invalid_prompt', 'message': 'Cannot execute because node LayerUtility: CropByMask does not exist.', 'details': "Node ID '#103'", 'extra_info': {}}
然后客户端就是HTTP Error 400: Bad Request
我看了 #4 issue,但是我的comfyui里面并没有python_embeded文件夹,也许我应该重新从官方库下一个comfyui?

@Bonjir
Copy link
Author

Bonjir commented Nov 4, 2024

我重新下载了comfy,但是这个报错并没有解决

@16131zzzzzzzz
Copy link
Owner

Have you run the workflow in comfyUI webui?

@Bonjir
Copy link
Author

Bonjir commented Nov 4, 2024

我尝试在comfyui webui中安装了nobel_workflow.json and nobel_workflow_for_install.json, 但是在webui中也会报错缺少node类型
Missing Node Types
When loading the graph, the following node types were not found

GroundingDinoModelLoader (segment anything)
SAMModelLoader (segment anything)
OpenposePreprocessor
LineartStandardPreprocessor
GroundingDinoSAMSegment (segment anything)
LayerUtility: CropByMask
ImageResize
LayerUtility: ImageRemoveAlpha
我想也许你可以上传一下你的comfy版本或是源码

@Bonjir
Copy link
Author

Bonjir commented Nov 5, 2024

Have you run the workflow in comfyUI webui?

嘿,找不到节点的问题解决了,我安装了一个comfyui manager然后就能一键安装所有节点,太棒了。
现在出现了新的问题, #12 和这位一样,prompt_outputs_failed_validation怎么解决呢
got prompt
Failed to validate prompt for output 164:

  • CheckpointLoaderSimple 132:
    • Value not in list: ckpt_name: 'dreamshaperXL_alpha2Xl10.safetensors' not in []
  • Lora Loader Stack (rgthree) 135:
    • Value not in list: lora_02: 'XL_Nobel_Prizes_style-000005.safetensors' not in ['None']
  • ControlNetLoader 130:
    • Value not in list: control_net_name: 'mistoLine_fp16.safetensors' not in []
  • ControlNetLoader 131:
    • Value not in list: control_net_name: 'iffusion_pytorch_model_promax.safetensors' not in []
  • VAELoader 35:
    • Value not in list: vae_name: 'sdxlVAE_sdxlVAE.safetensors' not in []
      Output will be ignored
      invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}

@16131zzzzzzzz
Copy link
Owner

Need to choose the right path of your own models. See https://github.com/16131zzzzzzzz/EveryoneNobel/blob/main/README_model.md

@Bonjir
Copy link
Author

Bonjir commented Nov 6, 2024

我按照你说的下载了这些models,现在我在comfy webui中点击queue prompt触发了以下报错。
got prompt
Failed to validate prompt for output 10:
* Lora Loader Stack (rgthree) 135:
- Value not in list: lora_02: '营销图模型\XL_Nobel_Prizes_style-000005.safetensors' not in ['None', 'XL_Nobel_Prizes_style-000005.safetensors']
* ControlNetLoader 131:
- Value not in list: control_net_name: 'SDXL\controlnet-union-sdxl-1.0\iffusion_pytorch_model_promax.safetensors' not in ['iffusion_pytorch_model_promax.safetensors', 'mistoLine_fp16.safetensors']
Output will be ignored
downloading https://huggingface.co/ShilongLiu/GroundingDINO/resolve/main/GroundingDINO_SwinB.cfg.py to D:\Download\Browser Download\ComfyUI-0.2.6\models\grounding-dino\GroundingDINO_SwinB.cfg.py
这个怎么解决

@Bonjir
Copy link
Author

Bonjir commented Nov 6, 2024

我在webui里面改了一下各model的路径,现在上一个问题解决了。现在可以run了,但run到一半就又报错了。
image

!!! Exception during processing !!! tuple index out of range
Traceback (most recent call last):
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\smZNodes.py", line 122, in encode_with_transformers_comfy_
z, pooled = ClipTextEncoderCustom._forward(self.wrapped, tokens) # self.wrapped.encode(tokens)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\smZNodes.py", line 113, in _forward
z, pooled_output = self.forward(tokens)
File "D:\Download\Browser Download\ComfyUI-0.2.6\comfy\sd1_clip.py", line 210, in forward
outputs = self.transformer(tokens, attention_mask_model, intermediate_output=self.layer_idx, final_layer_norm_intermediate=self.layer_norm_hidden_state, dtype=torch.float32)
File "C:\Users\86198\anaconda3\envs\comfyui\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\86198\anaconda3\envs\comfyui\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "D:\Download\Browser Download\ComfyUI-0.2.6\comfy\clip_model.py", line 136, in forward
x = self.text_model(*args, **kwargs)
File "C:\Users\86198\anaconda3\envs\comfyui\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\86198\anaconda3\envs\comfyui\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "D:\Download\Browser Download\ComfyUI-0.2.6\comfy\clip_model.py", line 100, in forward
x = self.embeddings(input_tokens, dtype=dtype)
File "C:\Users\86198\anaconda3\envs\comfyui\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\86198\anaconda3\envs\comfyui\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "D:\Download\Browser Download\ComfyUI-0.2.6\comfy\clip_model.py", line 81, in forward
return self.token_embedding(input_tokens, out_dtype=dtype) + comfy.ops.cast_to(self.position_embedding.weight, dtype=dtype, device=input_tokens.device)
File "C:\Users\86198\anaconda3\envs\comfyui\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\86198\anaconda3\envs\comfyui\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
TypeError: EmbeddingsWithFixes.forward() got an unexpected keyword argument 'out_dtype'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Download\Browser Download\ComfyUI-0.2.6\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 "D:\Download\Browser Download\ComfyUI-0.2.6\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 "D:\Download\Browser Download\ComfyUI-0.2.6\execution.py", line 169, in map_node_over_list
process_inputs(input_dict, i)
File "D:\Download\Browser Download\ComfyUI-0.2.6\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\nodes.py", line 87, in encode
result = run(**params)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\smZNodes.py", line 754, in run
cond, pooled = clip_clone.encode_from_tokens(tokens, True)
File "D:\Download\Browser Download\ComfyUI-0.2.6\comfy\sd.py", line 127, in encode_from_tokens
o = self.cond_stage_model.encode_token_weights(tokens)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\smZNodes.py", line 488, in encode_token_weights
g_out, g_pooled = self.clip_g.encode_token_weights(token_weight_pairs_g, steps, current_step, multi)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\smZNodes.py", line 443, in encode_token_weights
else: schedules = prompt_parser.get_learned_conditioning(model_hijack.cond_stage_model, texts, steps, None, opts.use_old_scheduling)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\modules\prompt_parser.py", line 198, in get_learned_conditioning
conds = model.forward(texts)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\modules\sd_hijack_clip.py", line 224, in forward
z = self.process_tokens(tokens, multipliers, multipliers_solo_emb)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\modules\sd_hijack_clip.py", line 254, in process_tokens
z = self.encode_with_transformers(tokens)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\smZNodes.py", line 196, in encode_with_transformers
return self.encode_with_transformers_comfy
(tokens, return_pooled)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\smZNodes.py", line 124, in encode_with_transformers_comfy

z, pooled = ClipTextEncoderCustom._forward(self.wrapped, tokens_orig)
File "D:\Download\Browser Download\ComfyUI-0.2.6\custom_nodes\ComfyUI_smZNodes-main\smZNodes.py", line 113, in _forward
z, pooled_output = self.forward(tokens)
File "D:\Download\Browser Download\ComfyUI-0.2.6\comfy\sd1_clip.py", line 193, in forward
tokens = self.set_up_textual_embeddings(tokens, backup_embeds)
File "D:\Download\Browser Download\ComfyUI-0.2.6\comfy\sd1_clip.py", line 165, in set_up_textual_embeddings
if y.shape[0] == current_embeds.weight.shape[1]:
IndexError: tuple index out of range

Prompt executed in 501.30 seconds
fatal: not a git repository (or any of the parent directories): .git
Failed to get ComfyUI version: Command '['git', 'describe', '--tags']' returned non-zero exit status 128.

(天啊这traceback is sooo loooong)

@16131zzzzzzzz
Copy link
Owner

从没见过这个问题 建议查一下所有模型能选的地方都选对了 其他可能就是comfyui和各个node版本要更新到最新版

@Bonjir
Copy link
Author

Bonjir commented Nov 7, 2024

我把smznode 节点重新安装了,现在报错的问题解决了,但是又有新的问题
如图,现在好像可以跑模型了,但是comfyui经常自己断开连接,像图中一样,我什么都没有做,它什么错也没有报,突然就断开连接了。我试了许多次,要么是我不动鼠标放一会,他就自己断开连接了,要么我看个视频,转头他又断开连接了,怎么绘事呢
image
image

@Bonjir
Copy link
Author

Bonjir commented Nov 7, 2024

之后我像你之前说的那样,把preview节点删掉然后放入everyonenobel的workflow,确实能运行一部分,但是运行到第13个节点报了奇怪的错,请问怎么解决
image

@Bonjir
Copy link
Author

Bonjir commented Nov 7, 2024

我运行了一下npm puppeteer browsers install chrome解决了上面的问题,现在没有任何报错运行成功了!
但是结果不太理想:
image
image
它输出了一份半成品,请问应该怎么调整

@16131zzzzzzzz
Copy link
Owner

readme里面有一句话,"!!!Delete all preview image node except the final output preview image!!!"

@Bonjir
Copy link
Author

Bonjir commented Nov 8, 2024

好耶终于成功跑完那个k-sample了
d8595be777140212cbf52b2bac96a366
151317a69471e464059973e97b3c892f
不过最后两个节点还是有点小小问题,如果能给点建议就再好不过了

@16131zzzzzzzz
Copy link
Owner

不知道 你有跑过npm install吗

@Estranger7
Copy link

我把smznode 节点重新安装了,现在报错的问题解决了,但是又有新的问题 如图,现在好像可以跑模型了,但是comfyui经常自己断开连接,像图中一样,我什么都没有做,它什么错也没有报,突然就断开连接了。我试了许多次,要么是我不动鼠标放一会,他就自己断开连接了,要么我看个视频,转头他又断开连接了,怎么绘事呢 image image

请问下这个断开连接的问题怎么解决的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants