ltdrdata / ComfyUI-extension-tutorials

584 stars 33 forks source link

Error generating in Image Refiner #41

Open gonzalu opened 6 months ago

gonzalu commented 6 months ago
F:\CUI\ComfyUI>python main.py
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-05-02 12:20:03.238336
** Platform: Windows
** Python version: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
** Python executable: C:\Users\gonza\AppData\Local\Programs\Python\Python310\python.exe
** Log path: F:\CUI\ComfyUI\comfyui.log

Prestartup times for custom nodes:
   0.6 seconds: F:\CUI\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 12288 MB, total RAM 65221 MB
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA RTX A3000 12GB Laptop GPU : cudaMallocAsync
VAE dtype: torch.bfloat16
Using pytorch cross attention
### Loading: ComfyUI-Impact-Pack (V5.3)
### Loading: ComfyUI-Impact-Pack (Subpack: V0.5)
[Impact Pack] Wildcards loading done.
### Loading: ComfyUI-Manager (V2.24.1)
### ComfyUI Revision: 2157 [89d0e9ab] | Released on '2024-05-02'
### Loading: ComfyUI-Workflow-Component (V0.43.3) !! WARN: This is an experimental extension. Extremely unstable. !!
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json

Import times for custom nodes:
   0.0 seconds: F:\CUI\ComfyUI\custom_nodes\websocket_image_save.py
   0.0 seconds: F:\CUI\ComfyUI\custom_nodes\ComfyUI_TiledKSampler
   0.0 seconds: F:\CUI\ComfyUI\custom_nodes\ComfyUI-Workflow-Component
   0.1 seconds: F:\CUI\ComfyUI\custom_nodes\Derfuu_ComfyUI_ModdedNodes
   0.3 seconds: F:\CUI\ComfyUI\custom_nodes\ComfyUI-Manager
   0.7 seconds: F:\CUI\ComfyUI\custom_nodes\ComfyUI-Impact-Pack

Starting server

To see the GUI go to: http://127.0.0.1:8188
got prompt
model_type EPS
Using pytorch attention in VAE
Using pytorch attention in VAE
clip missing: ['clip_l.logit_scale', 'clip_l.transformer.text_projection.weight']
Requested to load SDXLClipModel
Loading 1 new model
F:\CUI\ComfyUI\comfy\ldm\modules\attention.py:345: UserWarning: 1Torch was not compiled with flash attention. (Triggered internally at ..\aten\src\ATen\native\transformers\cuda\sdp_utils.cpp:455.)
  out = torch.nn.functional.scaled_dot_product_attention(q, k, v, attn_mask=mask, dropout_p=0.0, is_causal=False)
Requested to load AutoencoderKL
Loading 1 new model
Requested to load SDXL
Loading 1 new model
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:11<00:00,  1.84s/it]
Prompt executed in 28.87 seconds
model_type EPS
Using pytorch attention in VAE
Using pytorch attention in VAE
Error handling request
Traceback (most recent call last):
  File "C:\Users\gonza\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
  File "C:\Users\gonza\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\web_app.py", line 543, in _handle
    resp = await handler(request)
  File "C:\Users\gonza\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\web_middlewares.py", line 114, in impl
    return await handler(request)
  File "F:\CUI\ComfyUI\server.py", line 42, in cache_control
    response: web.Response = await handler(request)
  File "F:\CUI\ComfyUI\server.py", line 54, in cors_middleware
    response = await handler(request)
  File "F:\CUI\ComfyUI\custom_nodes\ComfyUI-Workflow-Component\image_refiner\custom_server.py", line 69, in imagerefiner_generate
    result = ir.generate(base_pil.convert('RGB'), mask_pil, prompt_data)
  File "F:\CUI\ComfyUI\custom_nodes\ComfyUI-Workflow-Component\image_refiner\imagerefiner.py", line 174, in generate
    input_data_all = prepare_input(class_def, merged_pil, mask_pil, prompt_data)
  File "F:\CUI\ComfyUI\custom_nodes\ComfyUI-Workflow-Component\image_refiner\imagerefiner.py", line 94, in prepare_input
    model, clip, vae = load_checkpoint(v['checkpoint'])
  File "F:\CUI\ComfyUI\custom_nodes\ComfyUI-Workflow-Component\image_refiner\imagerefiner.py", line 38, in load_checkpoint
    model, clip, vae = comfy_nodes.CheckpointLoaderSimple().load_checkpoint(ckpt_name)
  File "F:\CUI\ComfyUI\nodes.py", line 516, 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 "F:\CUI\ComfyUI\comfy\sd.py", line 545, in load_checkpoint_guess_config
    clip = CLIP(clip_target, embedding_directory=embedding_directory)
  File "F:\CUI\ComfyUI\comfy\sd.py", line 103, in __init__
    self.cond_stage_model = clip(**(params))
  File "F:\CUI\ComfyUI\comfy\sdxl_clip.py", line 40, in __init__
    self.clip_l = sd1_clip.SDClipModel(layer="hidden", layer_idx=-2, device=device, dtype=dtype, layer_norm_hidden_state=False)
  File "F:\CUI\ComfyUI\comfy\sd1_clip.py", line 81, in __init__
    self.transformer = model_class(config, dtype, device, comfy.ops.manual_cast)
  File "F:\CUI\ComfyUI\comfy\clip_model.py", line 124, in __init__
    self.text_projection.weight.copy_(torch.eye(embed_dim))
RuntimeError: a leaf Variable that requires grad is being used in an in-place operation.

I can share anything else you like. Workflow seems to generate fine...

image

gonzalu commented 6 months ago

image

No error on screen

image

But console complains and nothign generates in refiner...

image

Thanks for your help in advance... ( I know this is experimental and therefore not critical or that important :D )