HM-RunningHub/ComfyUI_RH_USO

This is a ComfyUI plug-in for bytedance-research/USO, easy to use

Python

54

4 commits

updated Sep 1, 2025

See the code

README

ComfyUI USO Node

A custom node for ComfyUI that integrates USO (Unified Style and Subject-Driven Generation) for high-quality image generation with style and subject control.

✨ Features

  • 🎨 Unified Style & Subject Generation: Powered by USO model based on FLUX architecture
  • 🎯 Style-Driven Generation: Generate images with specific artistic styles
  • πŸ‘€ Subject-Driven Generation: Maintain subject consistency across generations
  • πŸ”„ Multi-Style Support: Combine multiple styles in a single generation
  • βš™οΈ Memory Optimization: FP8 precision support for consumer-grade GPUs (~16GB VRAM)
  • πŸš€ Flexible Control: Advanced parameter control for fine-tuning results

πŸ”§ Node List

Core Nodes

  • RH_USO_Loader: Load and initialize USO models with optimization options
  • RH_USO_Generator: Generate images with style and subject control

πŸš€ Quick Installation

Step 1: Install the Node

# Navigate to ComfyUI custom_nodes directory
cd ComfyUI/custom_nodes

# Clone the repository
git clone https://github.com/HM-RunningHub/ComfyUI_RH_USO

# Install dependencies
cd ComfyUI_RH_USO
pip install -r requirements.txt

Step 2: Download Required Models

# Download FLUX.1-dev model (Required base model)
huggingface-cli download black-forest-labs/FLUX.1-dev flux1-dev.safetensors --local-dir models/diffusers/FLUX.1-dev
huggingface-cli download black-forest-labs/FLUX.1-dev ae.safetensors --local-dir models/diffusers/FLUX.1-dev

# Download USO model
huggingface-cli download bytedance-research/USO --local-dir models/uso

# Download SigLIP model
huggingface-cli download google/siglip-so400m-patch14-384 --local-dir models/clip/siglip-so400m-patch14-384

# Final model structure should look like:
models/
β”œβ”€β”€ diffusers/
β”‚   └── FLUX.1-dev/
β”‚       β”œβ”€β”€ flux1-dev.safetensors
β”‚       └── ae.safetensors
β”‚       └── ....
β”œβ”€β”€ uso/
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   └── uso.webp
β”‚   β”œβ”€β”€ config.json
β”‚   β”œβ”€β”€ download_repo_enhanced.py
β”‚   β”œβ”€β”€ README.md
β”‚   └── uso_flux_v1.0/
β”‚       β”œβ”€β”€ dit_lora.safetensors
β”‚       └── projector.safetensors
└── clip/
    └── siglip-so400m-patch14-384/
    
# Restart ComfyUI

πŸ“– Usage

Basic Workflow

[RH_USO_Loader] β†’ [RH_USO_Generator] β†’ [Save Image]

Generation Types

Style-Driven Generation

  • Load style reference images
  • Input text prompt describing the content
  • Generate images in the specified style

Subject-Driven Generation

  • Load subject reference image
  • Input text prompt with scene description
  • Generate images maintaining subject identity

Style + Subject Generation

  • Load both style and subject reference images
  • Combine style transfer with subject consistency
  • Generate images with unified style and preserved subjects

πŸ› οΈ Technical Requirements

  • GPU: 16GB+ VRAM (with FP8 optimization)
  • RAM: 32GB+ recommended
  • Storage: ~35GB for all models
    • FLUX.1-dev: ~24GB (flux1-dev.safetensors + ae.safetensors)
    • USO models: ~6GB
    • SigLIP: ~1.5GB
  • CUDA: Required for optimal performance

⚠️ Important Notes

  • Model Paths: Models must be placed in specific directories:
    • FLUX.1-dev β†’ models/diffusers/FLUX.1-dev/
    • USO models β†’ models/uso/
    • SigLIP β†’ models/clip/siglip-so400m-patch14-384/
  • FP8 mode recommended for consumer GPUs (reduces VRAM usage)
  • All model files must be downloaded before first use

πŸ“„ License

This project is licensed under Apache 2.0 License.

πŸ”— References

πŸ”— Example

image image image

🀝 Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

⭐ Citation

If you find this project useful, please consider citing the original USO paper:

@article{wu2025uso,
    title={USO: Unified Style and Subject-Driven Generation via Disentangled and Reward Learning},
    author={Shaojin Wu and Mengqi Huang and Yufeng Cheng and Wenxu Wu and Jiahe Tian and Yiming Luo and Fei Ding and Qian He},
    year={2025},
    eprint={2508.18966},
    archivePrefix={arXiv},
    primaryClass={cs.CV},
}

HM-RunningHub/ComfyUI_RH_USO

This is a ComfyUI plug-in for bytedance-research/USO, easy to use

Python

54

4 commits

updated Sep 1, 2025

See the code

README

ComfyUI USO Node

A custom node for ComfyUI that integrates USO (Unified Style and Subject-Driven Generation) for high-quality image generation with style and subject control.

✨ Features

  • 🎨 Unified Style & Subject Generation: Powered by USO model based on FLUX architecture
  • 🎯 Style-Driven Generation: Generate images with specific artistic styles
  • πŸ‘€ Subject-Driven Generation: Maintain subject consistency across generations
  • πŸ”„ Multi-Style Support: Combine multiple styles in a single generation
  • βš™οΈ Memory Optimization: FP8 precision support for consumer-grade GPUs (~16GB VRAM)
  • πŸš€ Flexible Control: Advanced parameter control for fine-tuning results

πŸ”§ Node List

Core Nodes

  • RH_USO_Loader: Load and initialize USO models with optimization options
  • RH_USO_Generator: Generate images with style and subject control

πŸš€ Quick Installation

Step 1: Install the Node

# Navigate to ComfyUI custom_nodes directory
cd ComfyUI/custom_nodes

# Clone the repository
git clone https://github.com/HM-RunningHub/ComfyUI_RH_USO

# Install dependencies
cd ComfyUI_RH_USO
pip install -r requirements.txt

Step 2: Download Required Models

# Download FLUX.1-dev model (Required base model)
huggingface-cli download black-forest-labs/FLUX.1-dev flux1-dev.safetensors --local-dir models/diffusers/FLUX.1-dev
huggingface-cli download black-forest-labs/FLUX.1-dev ae.safetensors --local-dir models/diffusers/FLUX.1-dev

# Download USO model
huggingface-cli download bytedance-research/USO --local-dir models/uso

# Download SigLIP model
huggingface-cli download google/siglip-so400m-patch14-384 --local-dir models/clip/siglip-so400m-patch14-384

# Final model structure should look like:
models/
β”œβ”€β”€ diffusers/
β”‚   └── FLUX.1-dev/
β”‚       β”œβ”€β”€ flux1-dev.safetensors
β”‚       └── ae.safetensors
β”‚       └── ....
β”œβ”€β”€ uso/
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   └── uso.webp
β”‚   β”œβ”€β”€ config.json
β”‚   β”œβ”€β”€ download_repo_enhanced.py
β”‚   β”œβ”€β”€ README.md
β”‚   └── uso_flux_v1.0/
β”‚       β”œβ”€β”€ dit_lora.safetensors
β”‚       └── projector.safetensors
└── clip/
    └── siglip-so400m-patch14-384/
    
# Restart ComfyUI

πŸ“– Usage

Basic Workflow

[RH_USO_Loader] β†’ [RH_USO_Generator] β†’ [Save Image]

Generation Types

Style-Driven Generation

  • Load style reference images
  • Input text prompt describing the content
  • Generate images in the specified style

Subject-Driven Generation

  • Load subject reference image
  • Input text prompt with scene description
  • Generate images maintaining subject identity

Style + Subject Generation

  • Load both style and subject reference images
  • Combine style transfer with subject consistency
  • Generate images with unified style and preserved subjects

πŸ› οΈ Technical Requirements

  • GPU: 16GB+ VRAM (with FP8 optimization)
  • RAM: 32GB+ recommended
  • Storage: ~35GB for all models
    • FLUX.1-dev: ~24GB (flux1-dev.safetensors + ae.safetensors)
    • USO models: ~6GB
    • SigLIP: ~1.5GB
  • CUDA: Required for optimal performance

⚠️ Important Notes

  • Model Paths: Models must be placed in specific directories:
    • FLUX.1-dev β†’ models/diffusers/FLUX.1-dev/
    • USO models β†’ models/uso/
    • SigLIP β†’ models/clip/siglip-so400m-patch14-384/
  • FP8 mode recommended for consumer GPUs (reduces VRAM usage)
  • All model files must be downloaded before first use

πŸ“„ License

This project is licensed under Apache 2.0 License.

πŸ”— References

πŸ”— Example

image image image

🀝 Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

⭐ Citation

If you find this project useful, please consider citing the original USO paper:

@article{wu2025uso,
    title={USO: Unified Style and Subject-Driven Generation via Disentangled and Reward Learning},
    author={Shaojin Wu and Mengqi Huang and Yufeng Cheng and Wenxu Wu and Jiahe Tian and Yiming Luo and Fei Ding and Qian He},
    year={2025},
    eprint={2508.18966},
    archivePrefix={arXiv},
    primaryClass={cs.CV},
}