File size: 1,320 Bytes
d312652
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ab48b82
d312652
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4d95325
d312652
 
 
4d95325
d312652
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
---
library_name: diffusers
tags:
- modular-diffusers
---
mellon nodes made with diffusers `ModularNode`



#### Instruction

Install [Mellon](https://github.com/cubiq/Mellon/)

download this folder insde the `custom` directory:

install from the latest modular diffusers branch. https://github.com/huggingface/diffusers/pull/11235

```
pip uninstall diffusers -y
pip install git+https://github.com/huggingface/diffusers.git@modular-refactor
```

run `python main.py` and that's it


#### Components Manager

To use diffusers components manager across different custom nodes, for now, add this in your `custom/__init__.py`


```python
from diffusers import ComponentsManager
components = ComponentsManager()
```

and add this code in all your custom nodes module file
```python
from custom import components
```

e.g.
```
custom/
β”œβ”€β”€ __init__.py              # create your components manager here 
β”œβ”€β”€ mellon-modular-diffusers/
β”‚   └── mellon-modular-diffusers.py # use in this


└── diff-diff/
    └── diff-diff.py # use in this too

```

#### example workflow

find workflow [here](https://huggingface.co/YiYiXu/diff-diff-mellon/resolve/main/workflow_modular.json)

![image/png](https://cdn-uploads.huggingface.co/production/uploads/624ef9ba9d608e459387b34e/fGL1wbsyPf6LotB-Q8IIk.png)