Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,16 @@
|
|
1 |
import os
|
2 |
-
import
|
3 |
import random
|
4 |
import torch
|
5 |
import numpy as np
|
6 |
from PIL import Image
|
7 |
import gradio as gr
|
8 |
|
9 |
-
#
|
10 |
-
repo_path = './ComfyUI'
|
11 |
-
|
12 |
-
|
13 |
-
if not os.path.exists(repo_path):
|
14 |
-
subprocess.run(['git', 'clone', '-b', branch_name, 'https://github.com/camenduru/ComfyUI.git', repo_path])
|
15 |
-
|
16 |
-
# Append paths to sys.path for imports
|
17 |
-
import sys
|
18 |
-
sys.path.append(os.path.join(repo_path, 'totoro_extras'))
|
19 |
|
20 |
-
# Import nodes and custom modules
|
21 |
from nodes import NODE_CLASS_MAPPINGS
|
22 |
from totoro_extras import nodes_custom_sampler, nodes_flux
|
23 |
|
|
|
1 |
import os
|
2 |
+
import sys
|
3 |
import random
|
4 |
import torch
|
5 |
import numpy as np
|
6 |
from PIL import Image
|
7 |
import gradio as gr
|
8 |
|
9 |
+
# Add the repository path to sys.path
|
10 |
+
repo_path = './ComfyUI/totoro_extras'
|
11 |
+
sys.path.append(repo_path)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
# Import nodes and custom modules after ensuring the path is set
|
14 |
from nodes import NODE_CLASS_MAPPINGS
|
15 |
from totoro_extras import nodes_custom_sampler, nodes_flux
|
16 |
|