mobenta commited on
Commit
7a9de80
·
verified ·
1 Parent(s): d54a4bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -12
app.py CHANGED
@@ -1,23 +1,16 @@
1
  import os
2
- import subprocess
3
  import random
4
  import torch
5
  import numpy as np
6
  from PIL import Image
7
  import gradio as gr
8
 
9
- # Clone the repository if not already present
10
- repo_path = './ComfyUI'
11
- branch_name = 'totoro4'
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