Comfy-Org / Comfy-Org/ComfyUI

Diffusion Model Loader (UNETLoader) misidentifies CosXL model type ?

Open
#8,256 0 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Expected Behavior

The UNet of the CosXL model should be identified as "V Prediction EDM" when loaded using the "UNETLoader" node ?

### Actual Behavior

When loading the UNet of a CosXL model using the UNETLoader node, terminal output says "model_type EPS" and the picture output is garbage. But if the same UNet is loaded using "CheckpointLoaderSimple" then terminal output says "model_type V Prediction EDM" and picture output is normal.

### Steps to Reproduce

Save the UNet, CLIPs and VAE of the CosXL models using the ModelSave, CLIPSave, VAESave node. Now load them for picture generation using UNETLoader, DualCLIPLoader, VAELoader nodes. The resultant picture will be garbage. Look at the terminal output; it will say model type is EPS; but when the original whole checkpoint is loaded using the CheckpointLoaderSimple node it will say model type is V Prediction EDM and picture output will be normal.

Initially thought the problem was with the ModelSave node but if the separated UNet is loaded using the CheckpointLoaderSimple node instead of the UNETLoader node then it says model type is V Prediction EDM and resulting picture is normal again. So the problem has to be in UNETLoader and how it handles the CosXL models' UNet.

### Debug Logs

```powershell
Nothing special really
Just this for CosXL UNet loaded using UNETLoader:
"model_type EPS"
```

### Other

Don't know much about these things. Sorry if it is not a problem or inherently so somehow.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.