ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

SDXL, is this an issue? "missing {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}"

Open CypherQube opened this issue 1 year ago • 1 comments

building MemoryEfficientAttnBlock with 512 in_channels... missing {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}

CypherQube avatar Jun 30 '23 20:06 CypherQube

This is fine. The position ids are a constant so loading them from the checkpoint doesn't really make sense which is why they are "missing".

comfyanonymous avatar Jun 30 '23 20:06 comfyanonymous

image but the process seems stopped...

saintzealot avatar Jul 29 '23 10:07 saintzealot

image

my device is MBP M1 Pro, and I tried to use the venv of SD webui to run ComfyUI. It worked. i don't know why... ^_^

saintzealot avatar Jul 29 '23 11:07 saintzealot

i have same error, but on an ec2 instance.

got prompt
model_type EPS
adm 2816
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
missing {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
Prompt executed in 8.48 seconds

edit: deployed comfyui on on A10(g5.2xl) and uploaded sdxl base as the checkpoint to start with.

veeragoni avatar Aug 07 '23 23:08 veeragoni

I ran into this problem tonight and found that the following option helped:

--force-fp32

I previously had tried to run it without any option to change the format and had tried the

--force-fp16

Here is a run and output:

python main.py --force-fp32  --listen --enable-cors-header '*'   --disable-cuda-malloc 
Total VRAM 65536 MB, total RAM 65536 MB
xformers version: 0.0.20
Forcing FP32, if this improves things please report it.
Set vram state to: SHARED
Device: mps
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention
Adding extra search path checkpoints path/to/stable-diffusion-webui/models/Stable-diffusion
Adding extra search path configs path/to/stable-diffusion-webui/models/Stable-diffusion
Adding extra search path vae path/to/stable-diffusion-webui/models/VAE
Adding extra search path loras path/to/stable-diffusion-webui/models/Lora
Adding extra search path loras path/to/stable-diffusion-webui/models/LyCORIS
Adding extra search path upscale_models path/to/stable-diffusion-webui/models/ESRGAN
Adding extra search path upscale_models path/to/stable-diffusion-webui/models/RealESRGAN
Adding extra search path upscale_models path/to/stable-diffusion-webui/models/SwinIR
Adding extra search path embeddings path/to/stable-diffusion-webui/embeddings
Adding extra search path hypernetworks path/to/stable-diffusion-webui/models/hypernetworks
Adding extra search path controlnet path/to/stable-diffusion-webui/models/ControlNet
### Loading: ComfyUI-Impact-Pack (V3.12.1)
### Loading: ComfyUI-Impact-Pack (Subpack: V0.2)

Import times for custom nodes:
   0.0 seconds: /Users/wingtangwong/DEV/AI/IMAGE_AI/ComfyUI/custom_nodes/ComfyUI_TiledKSampler
   0.5 seconds: /Users/wingtangwong/DEV/AI/IMAGE_AI/ComfyUI/custom_nodes/comfy_controlnet_preprocessors
   0.8 seconds: /Users/wingtangwong/DEV/AI/IMAGE_AI/ComfyUI/custom_nodes/ComfyUI-Impact-Pack

Starting server

To see the GUI go to: http://0.0.0.0:8188
got prompt
model_type EPS
adm 2816
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
missing {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:41<00:00,  2.75s/it]
model_type EPS
adm 2560
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
missing {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:15<00:00,  3.14s/it]
model_type EPS
adm 2816
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
missing {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'}
left over keys: dict_keys(['conditioner.embedders.1.model.transformer.text_model.embeddings.position_ids'])
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:13<00:00,  2.71s/it]
Prompt executed in 119.84 seconds

WingTangWong avatar Aug 08 '23 08:08 WingTangWong

same here on M1 mac

ruucm avatar Nov 26 '23 09:11 ruucm

Add arg srict=False in load_state_dict could fix the issue

kytimmylai avatar Jan 10 '24 14:01 kytimmylai