yanze commited on
Commit
27cd2c2
1 Parent(s): a64b1fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -29
app.py CHANGED
@@ -7,34 +7,6 @@ from pulid import attention_processor as attention
7
  from pulid.pipeline import PuLIDPipeline
8
  from pulid.utils import resize_numpy_image_long, seed_everything
9
 
10
- print(torch.__version__)
11
-
12
- import shutil
13
-
14
- def find_cuda():
15
- # Check if CUDA_HOME or CUDA_PATH environment variables are set
16
- cuda_home = os.environ.get('CUDA_HOME') or os.environ.get('CUDA_PATH')
17
-
18
- if cuda_home and os.path.exists(cuda_home):
19
- return cuda_home
20
-
21
- # Search for the nvcc executable in the system's PATH
22
- nvcc_path = shutil.which('nvcc')
23
-
24
- if nvcc_path:
25
- # Remove the 'bin/nvcc' part to get the CUDA installation path
26
- cuda_path = os.path.dirname(os.path.dirname(nvcc_path))
27
- return cuda_path
28
-
29
- return None
30
-
31
- cuda_path = find_cuda()
32
-
33
- if cuda_path:
34
- print(f"CUDA installation found at: {cuda_path}")
35
- else:
36
- print("CUDA installation not found")
37
-
38
 
39
  pipeline = PuLIDPipeline()
40
 
@@ -151,7 +123,7 @@ with gr.Blocks(title="PuLID", css=".gr-box {border-color: #8136e2}") as demo:
151
  maximum=1.5,
152
  step=0.1,
153
  )
154
- n_samples = gr.Slider(label="Num samples", value=4, minimum=1, maximum=8, step=1)
155
  seed = gr.Slider(
156
  label="Seed", value=42, minimum=np.iinfo(np.uint32).min, maximum=np.iinfo(np.uint32).max, step=1
157
  )
 
7
  from pulid.pipeline import PuLIDPipeline
8
  from pulid.utils import resize_numpy_image_long, seed_everything
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  pipeline = PuLIDPipeline()
12
 
 
123
  maximum=1.5,
124
  step=0.1,
125
  )
126
+ n_samples = gr.Slider(label="Num samples", value=4, minimum=1, maximum=4, step=1)
127
  seed = gr.Slider(
128
  label="Seed", value=42, minimum=np.iinfo(np.uint32).min, maximum=np.iinfo(np.uint32).max, step=1
129
  )