|
| 1 | +--- |
| 2 | +title: "ByteDance USO ComfyUI Native Workflow example" |
| 3 | +description: "Unified Style and Subject-Driven Generation with ByteDance's USO model" |
| 4 | +sidebarTitle: "ByteDance USO" |
| 5 | +--- |
| 6 | + |
| 7 | +import UpdateReminder from '/snippets/tutorials/update-reminder.mdx' |
| 8 | + |
| 9 | +**USO (Unified Style-Subject Optimized)** is a model developed by ByteDance's UXO Team that unifies style-driven and subject-driven generation tasks. |
| 10 | +Built on FLUX.1-dev architecture, the model achieves both style similarity and subject consistency through disentangled learning and style reward learning (SRL). |
| 11 | + |
| 12 | +USO supports three main approaches: |
| 13 | +- **Subject-Driven**: Place subjects into new scenes while maintaining identity consistency |
| 14 | +- **Style-Driven**: Apply artistic styles to new content based on reference images |
| 15 | +- **Combined**: Use both subject and style references simultaneously |
| 16 | + |
| 17 | +**Related Links** |
| 18 | +- [Project Page](https://bytedance.github.io/USO/) |
| 19 | +- [GitHub](https://github.com/bytedance/USO) |
| 20 | +- [Model Weights](https://huggingface.co/bytedance-research/USO) |
| 21 | + |
| 22 | +## ByteDance USO ComfyUI Native Workflow |
| 23 | + |
| 24 | +<UpdateReminder/> |
| 25 | + |
| 26 | +### 1. Workflow and input |
| 27 | + |
| 28 | +Download the image below and drag it into ComfyUI to load the corresponding workflow. |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | +<a |
| 33 | +className="prose" |
| 34 | +target='_blank' |
| 35 | +href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/templates/flux1_dev_uso_reference_image_gen.json" |
| 36 | +style={{ display: 'inline-block', backgroundColor: '#0078D6', color: '#ffffff', padding: '10px 20px', borderRadius: '8px', borderColor: "transparent", textDecoration: 'none', fontWeight: 'bold'}} |
| 37 | +> |
| 38 | + <p className="prose" style={{ margin: 0, fontSize: "0.8rem" }}>Download JSON Workflow</p> |
| 39 | +</a> |
| 40 | + |
| 41 | +Use the image below as an input image. |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | +### 2. Model links |
| 46 | + |
| 47 | + |
| 48 | +**checkpoints** |
| 49 | + |
| 50 | +- [flux1-dev-fp8.safetensors](https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors) |
| 51 | + |
| 52 | +**loras** |
| 53 | + |
| 54 | +- [uso-flux1-dit-lora-v1.safetensors](https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/main/split_files/loras/uso-flux1-dit-lora-v1.safetensors) |
| 55 | + |
| 56 | +**model_patches** |
| 57 | + |
| 58 | +- [uso-flux1-projector-v1.safetensors](https://huggingface.co/Comfy-Org/USO_1.0_Repackaged/resolve/main/split_files/model_patches/uso-flux1-projector-v1.safetensors) |
| 59 | + |
| 60 | +**clip_visions** |
| 61 | +- [sigclip_vision_patch14_384.safetensors](https://huggingface.co/Comfy-Org/sigclip_vision_384/resolve/main/sigclip_vision_patch14_384.safetensors) |
| 62 | + |
| 63 | +Please download all models and place them in the following directories: |
| 64 | + |
| 65 | +``` |
| 66 | +📂 ComfyUI/ |
| 67 | +├── 📂 models/ |
| 68 | +│ ├── 📂 checkpoints/ |
| 69 | +│ │ └── flux1-dev-fp8.safetensors |
| 70 | +│ ├── 📂 loras/ |
| 71 | +│ │ └── uso-flux1-dit-lora-v1.safetensors |
| 72 | +│ ├── 📂 model_patches/ |
| 73 | +│ │ └── uso-flux1-projector-v1.safetensors |
| 74 | +│ ├── 📂 clip_visions/ |
| 75 | +│ │ └── sigclip_vision_patch14_384.safetensors |
| 76 | +``` |
| 77 | + |
| 78 | + |
| 79 | +### 3. Workflow instructions |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | +1. Load models: |
| 84 | + - 1.1 Ensure the `Load Checkpoint` node has `flux1-dev-fp8.safetensors` loaded |
| 85 | + - 1.2 Ensure the `LoraLoaderModelOnly` node has `dit_lora.safetensors` loaded |
| 86 | + - 1.3 Ensure the `ModelPatchLoader` node has `projector.safetensors` loaded |
| 87 | + - 1.4 Ensure the `Load CLIP Vision` node has `sigclip_vision_patch14_384.safetensors` loaded |
| 88 | +2. Click `Upload` to upload the input image we provided |
| 89 | +3. In the example, we only use the `content reference` image input. If you want to use the `style reference` image input, you can use `Ctrl-B` to bypass the marked node group. |
| 90 | +4. Write your prompt or keep default |
| 91 | +5. The EasyCache node is for inference acceleration, but it will also sacrifice some quality and details. You can bypass it (Ctrl+B) if you don't need to use it. |
| 92 | +6. Click the `Run` button, or use the shortcut `Ctrl(Cmd) + Enter` to run the workflow |
| 93 | + |
| 94 | +### 4. Additional Notes |
| 95 | + |
| 96 | +1. Style reference only: |
| 97 | + |
| 98 | +We also provide a workflow that only uses style reference in the same workflow we provided |
| 99 | + |
| 100 | + |
| 101 | +The only different is we replaced the `content reference` node and only use an `Empty Latent Image` node. |
| 102 | + |
| 103 | +2. You can also bypass whole `Style Reference` group and use the workflow as a text to image workflow, which means this workflow has 4 variations |
| 104 | +- Only use content (subject) reference |
| 105 | +- Only use style reference |
| 106 | +- Mixed content and style reference |
| 107 | +- As a text to image workflow |
0 commit comments