mobenta commited on
Commit
0be8e8b
·
verified ·
1 Parent(s): 55a8e66

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -1,9 +1,19 @@
 
1
  import random
 
2
  import torch
3
  import numpy as np
4
  from PIL import Image
5
  import gradio as gr
6
 
 
 
 
 
 
 
 
 
7
  # Import nodes and custom modules
8
  import nodes
9
  from nodes import NODE_CLASS_MAPPINGS
 
1
+ import os
2
  import random
3
+ import subprocess
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
+ if not os.path.exists('ComfyUI'):
11
+ subprocess.run(['git', 'clone', '-b', 'totoro4', 'https://github.com/camenduru/ComfyUI.git'])
12
+
13
+ # Append paths to sys.path for imports
14
+ import sys
15
+ sys.path.append('./ComfyUI/totoro_extras')
16
+
17
  # Import nodes and custom modules
18
  import nodes
19
  from nodes import NODE_CLASS_MAPPINGS