Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion comfyui/cogvideox_fun/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def loadmodel(self, GPU_memory_mode, model, model_type, precision):
weight_dtype = {"bf16": torch.bfloat16, "fp16": torch.float16, "fp32": torch.float32}[precision]

mm.unload_all_models()
mm.cleanup_models()
mm.cleanup_models_gc()
mm.soft_empty_cache()

# Init processbar
Expand Down
11 changes: 10 additions & 1 deletion comfyui/comfyui_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
LoadCogVideoXFunModel)
from .comfyui_utils import script_directory
from .qwenimage.nodes import (CombineQwenImagePipeline, LoadQwenImageLora,
LoadQwenImageModel, LoadQwenImageProcessor,
LoadQwenImageModel, LoadQwenImageProcessor, LoadQwenImageControlNetInPipeline,
LoadQwenImageControlNetInModel, QwenImageControlSampler, QwenImageEditPlusSampler,
LoadQwenImageTextEncoderModel,
LoadQwenImageTransformerModel,
LoadQwenImageVAEModel, QwenImageEditSampler,
Expand Down Expand Up @@ -461,10 +462,14 @@ def run(self,camera_pose,fx,fy,cx,cy):
"LoadQwenImageVAEModel": LoadQwenImageVAEModel,
"LoadQwenImageProcessor": LoadQwenImageProcessor,
"CombineQwenImagePipeline": CombineQwenImagePipeline,
"LoadQwenImageControlNetInPipeline": LoadQwenImageControlNetInPipeline,
"LoadQwenImageControlNetInModel": LoadQwenImageControlNetInModel,

"LoadQwenImageModel": LoadQwenImageModel,
"QwenImageT2VSampler": QwenImageT2VSampler,
"QwenImageEditSampler": QwenImageEditSampler,
"QwenImageEditPlusSampler": QwenImageEditPlusSampler,
"QwenImageControlSampler": QwenImageControlSampler,

"LoadZImageLora": LoadZImageLora,
"LoadZImageTextEncoderModel": LoadZImageTextEncoderModel,
Expand Down Expand Up @@ -549,10 +554,14 @@ def run(self,camera_pose,fx,fy,cx,cy):
"LoadQwenImageVAEModel": "Load QwenImage VAE Model",
"LoadQwenImageProcessor": "Load QwenImage Processor",
"CombineQwenImagePipeline": "Combine QwenImage Pipeline",
"LoadQwenImageControlNetInPipeline": "Load QwenImage ControlNet In Pipeline",
"LoadQwenImageControlNetInModel": "Load QwenImage ControlNet In Model",

"LoadQwenImageModel": "Load QwenImage Model",
"QwenImageT2VSampler": "QwenImage T2V Sampler",
"QwenImageEditSampler": "QwenImage Edit Sampler",
"QwenImageEditPlusSampler": "QwenImage Edit Plus Sampler",
"QwenImageControlSampler": "QwenImage Control Sampler",

"LoadZImageLora": "Load ZImage Lora",
"LoadZImageTextEncoderModel": "Load ZImage TextEncoder Model",
Expand Down
90 changes: 89 additions & 1 deletion comfyui/qwenimage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,85 @@

## a. Model Links and Storage Locations

**Chunked loading is recommended** as it better aligns with ComfyUI's standard workflow.

### 1. Chunked Loading Weights (Recommended)

For chunked loading, it is recommended to directly download the Z-Image weights provided by ComfyUI official. Please organize the files according to the following directory structure:

**Core Model Files:**

| Component | File Name |
|-----------|-----------|
| Text Encoder | [`qwen_2.5_vl_7b_fp8_scaled.safetensors`](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors) |
| Diffusion Model | [`qwen_image_fp8_e4m3fn.safetensors`](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_fp8_e4m3fn.safetensors) |
| VAE | [`qwen_image_vae.safetensors`](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors) |
| tokenizer | [`tokenizer`](https://huggingface.co/Qwen/Qwen-Image-Edit/tree/main/tokenizer) |
| processor | [`processor`](https://huggingface.co/Qwen/Qwen-Image-Edit/tree/main/processor) |

**ControlNet Model Files:**

| Name | Storage | Hugging Face | Model Scope | Description |
|--|--|--|--|--|
| Qwen-Image-2512-Fun-Controlnet-Union | - | [🤗Link](https://huggingface.co/alibaba-pai/Qwen-Image-2512-Fun-Controlnet-Union) | [😄Link](https://modelscope.cn/models/PAI/Qwen-Image-2512-Fun-Controlnet-Union) | ControlNet weights for Qwen-Image-2512, supporting multiple control conditions such as Canny, Depth, Pose, MLSD, Scribble, etc. |

**Storage Location:**

```
📂 ComfyUI/
├── 📂 models/
│ ├── 📂 text_encoders/
│ │ └── qwen_2.5_vl_7b_fp8_scaled.safetensors
│ ├── 📂 diffusion_models/
│ │ └── qwen_image_fp8_e4m3fn.safetensors`
│ ├── 📂 vae/
│ │ └── qwen_image_vae.safetensors
│ ├── 📂 Fun_Models/
│ │ ├── qwen2_tokenizer/
│ │ └── qwen2_processor/
│ └── 📂 model_patches/
│ └── Qwen-Image-2512-Fun-Controlnet-Union.safetensors
```

### 2. Preprocessing Weights (Optional)

If you want to use the control preprocessing nodes, you can download the preprocessing weights to `ComfyUI/custom_nodes/Fun_Models/Third_Party/`.

**Required Files:**

| File Name | Download Link | Purpose |
|-----------|---------------|---------|
| `yolox_l.onnx` | [Download](https://huggingface.co/yzd-v/DWPose/resolve/main/yolox_l.onnx) | YOLO Detection Model |
| `dw-ll_ucoco_384.onnx` | [Download](https://huggingface.co/yzd-v/DWPose/resolve/main/dw-ll_ucoco_384.onnx) | DWPose Pose Estimation Model |
| `ZoeD_M12_N.pt` | [Download](https://huggingface.co/lllyasviel/Annotators/resolve/main/ZoeD_M12_N.pt) | ZoeDepth Depth Estimation Model |

**Storage Location:**

```
📂 ComfyUI/
├── 📂 models/
│ └── 📂 Fun_Models/
│ └── 📂 Third_Party
│ ├── yolox_l.onnx
│ ├── dw-ll_ucoco_384.onnx
│ └── ZoeD_M12_N.pt
```

### 3. Full Model Loading (Optional)

If you prefer full model loading, you can directly download the diffusers weights.

**Required Files:**

| Name | Storage | Hugging Face | Model Scope | Description |
|--|--|--|--|--|
| Qwen-Image | [🤗Link](https://huggingface.co/Qwen/Qwen-Image) | [😄Link](https://modelscope.cn/models/Qwen/Qwen-Image) | Official Qwen-Image weights |
| Qwen-Image-2512 | [🤗Link](https://huggingface.co/Qwen/Qwen-Image-2512) | [😄Link](https://modelscope.cn/models/Qwen/Qwen-Image-2512) | Official Qwen-Image weights |
| Qwen-Image-Edit | [🤗Link](https://huggingface.co/Qwen/Qwen-Image-Edit) | [😄Link](https://modelscope.cn/models/Qwen/Qwen-Image-Edit) | Official Qwen-Image-Edit weights |
| Qwen-Image-Edit-2509 | [🤗Link](https://huggingface.co/Qwen/Qwen-Image-Edit-2509) | [😄Link](https://modelscope.cn/models/Qwen/Qwen-Image-Edit-2509) | Official Qwen-Image-Edit-2509 weights |
| Qwen-Image-Edit-2511 | [🤗Link](https://huggingface.co/Qwen/Qwen-Image-Edit-2511) | [😄Link](https://modelscope.cn/models/Qwen/Qwen-Image-Edit-2511) | Official Qwen-Image-Edit-2511 weights |

For full model loading, use the diffusers version of Qwen-Image Turbo and place the model in `ComfyUI/models/Fun_Models/`.

**Storage Location:**

Expand All @@ -26,10 +98,26 @@

[Qwen-Image Text to Image](v1/qwenimage_chunked_loading_workflow_t2i.json)

[Qwen-Image Text to Image Control](v1/qwenimage_chunked_loading_workflow_t2i_control.json)

[Qwen-Image Text to Image Inpaint](v1/qwenimage_chunked_loading_workflow_t2i_inpaint.json)

[Qwen-Image Edit](v1/qwenimage_chunked_loading_workflow_edit.json)

[Qwen-Image Edit 2509](v1/qwenimage_chunked_loading_workflow_edit_2509.json)

[Qwen-Image Edit 2511](v1/qwenimage_chunked_loading_workflow_edit_2511.json)

### 2. Full Model Loading (Optional)

[Qwen-Image Text to Image](v1/qwenimage_workflow_t2i.json)

[Qwen-Image Edit](v1/qwenimage_workflow_edit.json)
[Qwen-Image Text to Image Control](v1/qwenimage_workflow_t2i_control.json)

[Qwen-Image Text to Image Inpaint](v1/qwenimage_workflow_t2i_inpaint.json)

[Qwen-Image Edit](v1/qwenimage_workflow_edit.json)

[Qwen-Image Edit 2509](v1/qwenimage_workflow_edit_2509.json)

[Qwen-Image Edit 2511](v1/qwenimage_workflow_edit_2511.json)
Loading