ComfyUI Extension: ComfyUI-UniWorld-jd17

Authored by judian17

Created

Updated

22 stars

Unofficial ComfyUI implementation of a/UniWorld-V1.

Custom Nodes (0)

    README

    ComfyUI-UniWorld-jd17

    Unofficial ComfyUI implementation of the image editing part of UniWorld-V1.

    中文版说明

    Introduction

    The workflow and results are shown in the figure below.

    Example

    The image editing feature is probably implemented :)

    Note: Please ensure that transformers==4.50.0 in your ComfyUI environment (I tested that 4.52.3 causes errors, and I'm not sure about lower versions).

    Weight Extraction

    You can use extract_uniworld_weights.py to extract the Flux model weights and the remaining weights from the UniWorld model. Example:

    python "path/to/extract_uniworld_weights.py" "path/to/uniworld-32" "path/to/uniworld-16-extracted"
    

    The extracted Flux weights can be loaded directly using ComfyUI's UnetLoader. The remaining weights are used for text encoding in the UniWorld Encoder node (this requires modifying the config.json file accordingly).

    NF4 Quantized Model Support

    Special thanks to wikeeyang for providing the UniWorld-V1-NF4 model.

    You can use extract_uniworld_nf4_weights.py to extract the NF4 quantized Qwen2.5VL weights. Example:

    python "path/to/extract_uniworld_nf4_weights.py" "path/to/uniworld-v1-nf4" "path/to/uniworld-v1-nf4-extracted"
    

    These weights are also used for text encoding in the UniWorld Encoder node (this requires modifying the config.json file accordingly).

    Downloads

    Here are the download links for some pre-processed model weights:

    Flux weights from UniWorld-V1:

    Qwen2.5VL weights from UniWorld-V1:

    Alternatively, you can download the official models and process them using the provided scripts. config.json for bf16 is the configuration file for the bf16 version of the UniWorld Encoder model, and config.json for nf4 is for the nf4 version.

    Additional Notes

    I am not an expert in coding. The nodes in this project were primarily developed with the help of Gemini. Based on the output results, it seems to be working as intended. If you find any areas for improvement, please feel free to point them out!