YaohuiW hysts HF Staff commited on
Commit
1672673
·
verified ·
1 Parent(s): dcdcc37

ZeroGPU (#3)

Browse files

- ZeroGPU (bc257b55dd9332eb88087037c3860874746af102)


Co-authored-by: hysts <[email protected]>

.gitattributes CHANGED
@@ -33,21 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
- data/driving/driving1.mp4 filter=lfs diff=lfs merge=lfs -text
37
- data/driving/driving2.mp4 filter=lfs diff=lfs merge=lfs -text
38
- data/driving/driving3.mp4 filter=lfs diff=lfs merge=lfs -text
39
- data/driving/driving4.mp4 filter=lfs diff=lfs merge=lfs -text
40
- data/driving/driving9.mp4 filter=lfs diff=lfs merge=lfs -text
41
- data/source/einstein.png filter=lfs diff=lfs merge=lfs -text
42
- data/source/macron.png filter=lfs diff=lfs merge=lfs -text
43
- data/source/portrait1.png filter=lfs diff=lfs merge=lfs -text
44
- data/source/portrait2.png filter=lfs diff=lfs merge=lfs -text
45
- data/source/portrait3.png filter=lfs diff=lfs merge=lfs -text
46
- torch_extension/fused/fused_bias_act_kernel.cuda.o filter=lfs diff=lfs merge=lfs -text
47
- torch_extension/fused/fused_bias_act.o filter=lfs diff=lfs merge=lfs -text
48
- torch_extension/fused/fused.so filter=lfs diff=lfs merge=lfs -text
49
- torch_extension/upfirdn2d/upfirdn2d_kernel.cuda.o filter=lfs diff=lfs merge=lfs -text
50
- torch_extension/upfirdn2d/upfirdn2d.o filter=lfs diff=lfs merge=lfs -text
51
- torch_extension/upfirdn2d/upfirdn2d.so filter=lfs diff=lfs merge=lfs -text
52
- data/source/taylor.png filter=lfs diff=lfs merge=lfs -text
53
- data/driving/driving8.mp4 filter=lfs diff=lfs merge=lfs -text
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.so filter=lfs diff=lfs merge=lfs -text
37
+ *.png filter=lfs diff=lfs merge=lfs -text
38
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -4,9 +4,8 @@ emoji: 🐠
4
  colorFrom: pink
5
  colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 5.41.1
8
  app_file: app.py
9
- python_version: 3.11
10
  pinned: false
11
  license: mit
12
  ---
 
4
  colorFrom: pink
5
  colorTo: yellow
6
  sdk: gradio
7
+ sdk_version: 5.42.0
8
  app_file: app.py
 
9
  pinned: false
10
  license: mit
11
  ---
app.py CHANGED
@@ -1,21 +1,15 @@
1
  import gradio as gr
2
- import subprocess
3
- import os
4
- import spaces
5
  import torch
 
6
 
7
- extensions_dir = "./torch_extension/"
8
- os.environ["TORCH_EXTENSIONS_DIR"] = extensions_dir
9
-
10
  from networks.generator import Generator
11
 
12
  device = torch.device("cuda")
13
  gen = Generator(size=512, motion_dim=40, scale=2).to(device)
14
- tmp_ckpt_path = "/home/user/.cache/torch/hub/checkpoints/lia-x.pt"
15
- if os.path.exists(tmp_ckpt_path):
16
- gen.load_state_dict(torch.load(tmp_ckpt_path, weights_only=True))
17
- else:
18
- gen.load_state_dict(torch.hub.load_state_dict_from_url(f"https://huggingface.co/YaohuiW/LIA-X/resolve/main/lia-x.pt"))
19
  gen.eval()
20
 
21
  chunk_size=8
@@ -38,18 +32,7 @@ custom_css = """
38
  </style>
39
  """
40
 
41
-
42
- # def load_tabs():
43
- # from gradio_tabs.animation import animation
44
- # from gradio_tabs.vid_edit import vid_edit
45
-
46
- # animation()
47
- # vid_edit()
48
-
49
-
50
  with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
51
- # ... (input/output setup remains unchanged)
52
-
53
  gr.HTML(load_file("assets/title.md"))
54
  with gr.Row():
55
  with gr.Accordion(open=False, label="Instruction"):
@@ -57,14 +40,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
57
 
58
  with gr.Row():
59
  with gr.Tabs():
60
- from gradio_tabs.animation import animation
61
- from gradio_tabs.vid_edit import vid_edit
62
  animation(gen, chunk_size, device)
63
  vid_edit(gen, chunk_size, device)
64
 
65
-
66
- demo.launch(
67
- server_name='0.0.0.0',
68
- share=True,
69
- allowed_paths=["./data/source","./data/driving"]
70
- )
 
1
  import gradio as gr
 
 
 
2
  import torch
3
+ from huggingface_hub import hf_hub_download
4
 
5
+ from gradio_tabs.animation import animation
6
+ from gradio_tabs.vid_edit import vid_edit
 
7
  from networks.generator import Generator
8
 
9
  device = torch.device("cuda")
10
  gen = Generator(size=512, motion_dim=40, scale=2).to(device)
11
+ ckpt_path = hf_hub_download(repo_id="YaohuiW/LIA-X", filename="lia-x.pt")
12
+ gen.load_state_dict(torch.load(ckpt_path, weights_only=True))
 
 
 
13
  gen.eval()
14
 
15
  chunk_size=8
 
32
  </style>
33
  """
34
 
 
 
 
 
 
 
 
 
 
35
  with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
 
 
36
  gr.HTML(load_file("assets/title.md"))
37
  with gr.Row():
38
  with gr.Accordion(open=False, label="Instruction"):
 
40
 
41
  with gr.Row():
42
  with gr.Tabs():
 
 
43
  animation(gen, chunk_size, device)
44
  vid_edit(gen, chunk_size, device)
45
 
46
+ demo.launch(allowed_paths=["./data/source","./data/driving"])
 
 
 
 
 
gradio_tabs/animation.py CHANGED
@@ -1,14 +1,12 @@
 
 
1
  import gradio as gr
2
- import os
 
3
  import torch
4
  import torchvision
5
- from PIL import Image
6
  import numpy as np
7
- import imageio
8
- import spaces
9
-
10
- output_dir = "./res_gradio"
11
- os.makedirs(output_dir, exist_ok=True)
12
 
13
  # lables
14
  labels_k = [
@@ -93,28 +91,32 @@ def vid_denorm(vid):
93
  return vid
94
 
95
 
96
- def img_postprocessing(image, output_path=output_dir + "/output_img.png"):
97
 
98
  image = image.permute(0, 2, 3, 1)
99
  edited_image = img_denorm(image)
100
  img_output = (edited_image[0].numpy() * 255).astype(np.uint8)
101
- imageio.imwrite(output_path, img_output, quality=6)
102
 
103
- return output_path
 
 
 
104
 
105
 
106
- def vid_postprocessing(video, fps, output_path=output_dir + "/output_vid.mp4"):
107
  # video: BCTHW
108
 
109
  vid = video.permute(0, 2, 3, 4, 1) # B T H W C
110
  vid_np = (vid_denorm(vid[0]).numpy() * 255).astype('uint8')
111
- imageio.mimwrite(output_path, vid_np, fps=fps, codec='libx264', quality=10)
112
 
113
- return output_path
 
 
114
 
115
 
116
  def animation(gen, chunk_size, device):
117
 
 
118
  @torch.no_grad()
119
  def edit_media(image, *selected_s):
120
 
@@ -128,6 +130,7 @@ def animation(gen, chunk_size, device):
128
 
129
  return edited_image
130
 
 
131
  @torch.no_grad()
132
  def animate_media(image, video, *selected_s):
133
 
@@ -168,7 +171,6 @@ def animation(gen, chunk_size, device):
168
  ["./data/source/portrait3.png"],
169
  ],
170
  inputs=[image_input],
171
- cache_examples=False,
172
  visible=True,
173
  )
174
 
@@ -183,7 +185,6 @@ def animation(gen, chunk_size, device):
183
  ["./data/driving/driving8.mp4"],
184
  ],
185
  inputs=[video_input],
186
- cache_examples=False,
187
  visible=True,
188
  )
189
 
@@ -276,7 +277,6 @@ def animation(gen, chunk_size, device):
276
  fn=animate_media,
277
  inputs=[image_input, video_input] + inputs_s,
278
  outputs=[image_output, video_output],
279
- cache_examples=True,
280
  )
281
 
282
 
 
1
+ import tempfile
2
+
3
  import gradio as gr
4
+ import imageio
5
+ import spaces
6
  import torch
7
  import torchvision
 
8
  import numpy as np
9
+ from PIL import Image
 
 
 
 
10
 
11
  # lables
12
  labels_k = [
 
91
  return vid
92
 
93
 
94
+ def img_postprocessing(image):
95
 
96
  image = image.permute(0, 2, 3, 1)
97
  edited_image = img_denorm(image)
98
  img_output = (edited_image[0].numpy() * 255).astype(np.uint8)
 
99
 
100
+ with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as temp_file:
101
+ imageio.imwrite(temp_file.name, img_output, quality=6)
102
+ return temp_file.name
103
+
104
 
105
 
106
+ def vid_postprocessing(video, fps):
107
  # video: BCTHW
108
 
109
  vid = video.permute(0, 2, 3, 4, 1) # B T H W C
110
  vid_np = (vid_denorm(vid[0]).numpy() * 255).astype('uint8')
 
111
 
112
+ with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as temp_file:
113
+ imageio.mimwrite(temp_file.name, vid_np, fps=fps, codec='libx264', quality=10)
114
+ return temp_file.name
115
 
116
 
117
  def animation(gen, chunk_size, device):
118
 
119
+ @spaces.GPU
120
  @torch.no_grad()
121
  def edit_media(image, *selected_s):
122
 
 
130
 
131
  return edited_image
132
 
133
+ @spaces.GPU
134
  @torch.no_grad()
135
  def animate_media(image, video, *selected_s):
136
 
 
171
  ["./data/source/portrait3.png"],
172
  ],
173
  inputs=[image_input],
 
174
  visible=True,
175
  )
176
 
 
185
  ["./data/driving/driving8.mp4"],
186
  ],
187
  inputs=[video_input],
 
188
  visible=True,
189
  )
190
 
 
277
  fn=animate_media,
278
  inputs=[image_input, video_input] + inputs_s,
279
  outputs=[image_output, video_output],
 
280
  )
281
 
282
 
gradio_tabs/vid_edit.py CHANGED
@@ -1,15 +1,13 @@
 
 
1
  import gradio as gr
2
- import os
 
 
3
  import torch
4
  import torchvision
5
- from PIL import Image
6
- import numpy as np
7
- import imageio
8
  from einops import rearrange
9
- import spaces
10
-
11
- output_dir = "./res_gradio"
12
- os.makedirs(output_dir, exist_ok=True)
13
 
14
  # lables
15
  labels_k = [
@@ -94,16 +92,17 @@ def vid_denorm(vid):
94
  return vid
95
 
96
 
97
- def img_postprocessing(image, output_path=output_dir + "/output_img.png"):
98
  image = image.permute(0, 2, 3, 1)
99
  edited_image = img_denorm(image)
100
  img_output = (edited_image[0].numpy() * 255).astype(np.uint8)
101
- imageio.imwrite(output_path, img_output, quality=6)
102
 
103
- return output_path
 
 
104
 
105
 
106
- def vid_all_save(vid_d, vid_a, fps, output_path=output_dir + "/output_vid.mp4", output_all_path=output_dir + "/output_all_vid.mp4"):
107
 
108
  vid_d = rearrange(vid_d, 'b t c h w -> b t h w c')
109
  vid_a = rearrange(vid_a, 'b c t h w -> b t h w c')
@@ -112,15 +111,18 @@ def vid_all_save(vid_d, vid_a, fps, output_path=output_dir + "/output_vid.mp4",
112
  vid_a_np = (vid_denorm(vid_a[0]).numpy() * 255).astype('uint8')
113
  vid_all_np = (vid_denorm(vid_all[0]).numpy() * 255).astype('uint8')
114
 
115
- imageio.mimwrite(output_path, vid_a_np, fps=fps, codec='libx264', quality=8)
116
- imageio.mimwrite(output_all_path, vid_all_np, fps=fps, codec='libx264', quality=8)
117
 
118
- return output_path, output_all_path
 
 
 
119
 
120
 
121
  def vid_edit(gen, chunk_size, device):
122
 
123
-
124
  @torch.no_grad()
125
  def edit_img(video, *selected_s):
126
 
@@ -135,7 +137,7 @@ def vid_edit(gen, chunk_size, device):
135
 
136
  return edited_image
137
 
138
-
139
  @torch.no_grad()
140
  def edit_vid(video, *selected_s):
141
 
@@ -178,7 +180,6 @@ def vid_edit(gen, chunk_size, device):
178
  ["./data/driving/driving9.mp4"],
179
  ],
180
  inputs=[video_input],
181
- cache_examples=False,
182
  visible=True,
183
  )
184
 
@@ -272,7 +273,6 @@ def vid_edit(gen, chunk_size, device):
272
  fn=edit_vid,
273
  inputs=[video_input] + inputs_s,
274
  outputs=[image_output, video_output, video_all_output],
275
- cache_examples=True,
276
  )
277
 
278
 
 
1
+ import tempfile
2
+
3
  import gradio as gr
4
+ import imageio
5
+ import numpy as np
6
+ import spaces
7
  import torch
8
  import torchvision
 
 
 
9
  from einops import rearrange
10
+ from PIL import Image
 
 
 
11
 
12
  # lables
13
  labels_k = [
 
92
  return vid
93
 
94
 
95
+ def img_postprocessing(image):
96
  image = image.permute(0, 2, 3, 1)
97
  edited_image = img_denorm(image)
98
  img_output = (edited_image[0].numpy() * 255).astype(np.uint8)
 
99
 
100
+ with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as temp_file:
101
+ imageio.imwrite(temp_file.name, img_output, quality=6)
102
+ return temp_file.name
103
 
104
 
105
+ def vid_all_save(vid_d, vid_a, fps):
106
 
107
  vid_d = rearrange(vid_d, 'b t c h w -> b t h w c')
108
  vid_a = rearrange(vid_a, 'b c t h w -> b t h w c')
 
111
  vid_a_np = (vid_denorm(vid_a[0]).numpy() * 255).astype('uint8')
112
  vid_all_np = (vid_denorm(vid_all[0]).numpy() * 255).astype('uint8')
113
 
114
+ with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as output_path:
115
+ imageio.mimwrite(output_path.name, vid_a_np, fps=fps, codec='libx264', quality=8)
116
 
117
+ with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as output_all_path:
118
+ imageio.mimwrite(output_all_path.name, vid_all_np, fps=fps, codec='libx264', quality=8)
119
+
120
+ return output_path.name, output_all_path.name
121
 
122
 
123
  def vid_edit(gen, chunk_size, device):
124
 
125
+ @spaces.GPU
126
  @torch.no_grad()
127
  def edit_img(video, *selected_s):
128
 
 
137
 
138
  return edited_image
139
 
140
+ @spaces.GPU
141
  @torch.no_grad()
142
  def edit_vid(video, *selected_s):
143
 
 
180
  ["./data/driving/driving9.mp4"],
181
  ],
182
  inputs=[video_input],
 
183
  visible=True,
184
  )
185
 
 
273
  fn=edit_vid,
274
  inputs=[video_input] + inputs_s,
275
  outputs=[image_output, video_output, video_all_output],
 
276
  )
277
 
278
 
{torch_extension/fused → networks/op}/fused.so RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:0434000b297e05aab7b7a7d537d32c3710cde943861c4cad5ef85db88964757d
3
- size 1297184
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4d30ec1a330c9da4dd52648c85f278308a03d95e0cca21b9cbf29c538eb2e8b
3
+ size 1433496
networks/op/fused_act.py CHANGED
@@ -7,14 +7,17 @@ from torch.autograd import Function
7
  from torch.utils.cpp_extension import load
8
 
9
 
10
- module_path = os.path.dirname(__file__)
11
- fused = load(
12
- "fused",
13
- sources=[
14
- os.path.join(module_path, "fused_bias_act.cpp"),
15
- os.path.join(module_path, "fused_bias_act_kernel.cu"),
16
- ],
17
- )
 
 
 
18
 
19
 
20
  class FusedLeakyReLUFunctionBackward(Function):
 
7
  from torch.utils.cpp_extension import load
8
 
9
 
10
+ if os.getenv("SPACE_ID"):
11
+ import networks.op.fused as fused
12
+ else:
13
+ module_path = os.path.dirname(__file__)
14
+ fused = load(
15
+ "fused",
16
+ sources=[
17
+ os.path.join(module_path, "fused_bias_act.cpp"),
18
+ os.path.join(module_path, "fused_bias_act_kernel.cu"),
19
+ ],
20
+ )
21
 
22
 
23
  class FusedLeakyReLUFunctionBackward(Function):
networks/op/upfirdn2d.py CHANGED
@@ -7,14 +7,17 @@ from torch.autograd import Function
7
  from torch.utils.cpp_extension import load
8
 
9
 
10
- module_path = os.path.dirname(__file__)
11
- upfirdn2d_op = load(
12
- "upfirdn2d",
13
- sources=[
14
- os.path.join(module_path, "upfirdn2d.cpp"),
15
- os.path.join(module_path, "upfirdn2d_kernel.cu"),
16
- ],
17
- )
 
 
 
18
 
19
 
20
  class UpFirDn2dBackward(Function):
 
7
  from torch.utils.cpp_extension import load
8
 
9
 
10
+ if os.getenv("SPACE_ID"):
11
+ import networks.op.upfirdn2d_op as upfirdn2d_op
12
+ else:
13
+ module_path = os.path.dirname(__file__)
14
+ upfirdn2d_op = load(
15
+ "upfirdn2d",
16
+ sources=[
17
+ os.path.join(module_path, "upfirdn2d.cpp"),
18
+ os.path.join(module_path, "upfirdn2d_kernel.cu"),
19
+ ],
20
+ )
21
 
22
 
23
  class UpFirDn2dBackward(Function):
torch_extension/upfirdn2d/upfirdn2d.o → networks/op/upfirdn2d_op.so RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9246c5a518be0a3b0909204f8b3a07bbccc9bf2ac6c413b15827f900d3452877
3
- size 1934968
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76d62a2db1f3493ccd4cd7f55c491d8d942926d45d68fae5a89af2a200029628
3
+ size 1625920
requirements.txt CHANGED
@@ -1,11 +1,7 @@
1
- torch==2.0.1
2
- torchvision==0.15.2
3
  einops==0.8.1
4
  imageio==2.37.0
5
- numpy==1.24.3
6
- Pillow==11.3.0
7
- PyYAML==6.0.2
8
- tqdm==4.67.1
9
- ninja==1.11.1.4
10
- av==14.2.0
11
  imageio-ffmpeg==0.6.0
 
 
 
 
1
+ av==15.0.0
 
2
  einops==0.8.1
3
  imageio==2.37.0
 
 
 
 
 
 
4
  imageio-ffmpeg==0.6.0
5
+ ninja==1.11.1.4
6
+ torch==2.5.1
7
+ torchvision==0.20.1
torch_extension/fused/build.ninja DELETED
@@ -1,35 +0,0 @@
1
- ninja_required_version = 1.3
2
- cxx = c++
3
- nvcc = /mnt/petrelfs/share/cuda-11.7/bin/nvcc
4
-
5
- cflags = -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/TH -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/THC -isystem /mnt/petrelfs/share/cuda-11.7/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/include/python3.11 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17
6
- post_cflags =
7
- cuda_cflags = -DTORCH_EXTENSION_NAME=fused -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/TH -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/THC -isystem /mnt/petrelfs/share/cuda-11.7/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/include/python3.11 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++17
8
- cuda_post_cflags =
9
- cuda_dlink_post_cflags =
10
- ldflags = -shared -L/mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/lib -lc10 -lc10_cuda -ltorch_cpu -ltorch_cuda -ltorch -ltorch_python -L/mnt/petrelfs/share/cuda-11.7/lib64 -lcudart
11
-
12
- rule compile
13
- command = $cxx -MMD -MF $out.d $cflags -c $in -o $out $post_cflags
14
- depfile = $out.d
15
- deps = gcc
16
-
17
- rule cuda_compile
18
- depfile = $out.d
19
- deps = gcc
20
- command = $nvcc $cuda_cflags -c $in -o $out $cuda_post_cflags
21
-
22
-
23
-
24
- rule link
25
- command = $cxx $in $ldflags -o $out
26
-
27
- build fused_bias_act.o: compile /mnt/hwfile/wangyaohui/projects/LIA-X/LIAX-release/networks/op/fused_bias_act.cpp
28
- build fused_bias_act_kernel.cuda.o: cuda_compile /mnt/hwfile/wangyaohui/projects/LIA-X/LIAX-release/networks/op/fused_bias_act_kernel.cu
29
-
30
-
31
-
32
- build fused.so: link fused_bias_act.o fused_bias_act_kernel.cuda.o
33
-
34
- default fused.so
35
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
torch_extension/fused/fused_bias_act.o DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:11ef1d0528905c05b8866df6448a36da47e96bdf2c52e840ddd5c876791dc1e6
3
- size 1928096
 
 
 
 
torch_extension/fused/fused_bias_act_kernel.cuda.o DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4a576cabbb56d980122af7c924410f8160fa3c81be957f1a05b2c75a932252a5
3
- size 579704
 
 
 
 
torch_extension/upfirdn2d/build.ninja DELETED
@@ -1,35 +0,0 @@
1
- ninja_required_version = 1.3
2
- cxx = c++
3
- nvcc = /mnt/petrelfs/share/cuda-11.7/bin/nvcc
4
-
5
- cflags = -DTORCH_EXTENSION_NAME=upfirdn2d -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/TH -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/THC -isystem /mnt/petrelfs/share/cuda-11.7/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/include/python3.11 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17
6
- post_cflags =
7
- cuda_cflags = -DTORCH_EXTENSION_NAME=upfirdn2d -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/TH -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/include/THC -isystem /mnt/petrelfs/share/cuda-11.7/include -isystem /mnt/petrelfs/wangyaohui/anaconda3/envs/latte/include/python3.11 -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80 --compiler-options '-fPIC' -std=c++17
8
- cuda_post_cflags =
9
- cuda_dlink_post_cflags =
10
- ldflags = -shared -L/mnt/petrelfs/wangyaohui/anaconda3/envs/latte/lib/python3.11/site-packages/torch/lib -lc10 -lc10_cuda -ltorch_cpu -ltorch_cuda -ltorch -ltorch_python -L/mnt/petrelfs/share/cuda-11.7/lib64 -lcudart
11
-
12
- rule compile
13
- command = $cxx -MMD -MF $out.d $cflags -c $in -o $out $post_cflags
14
- depfile = $out.d
15
- deps = gcc
16
-
17
- rule cuda_compile
18
- depfile = $out.d
19
- deps = gcc
20
- command = $nvcc $cuda_cflags -c $in -o $out $cuda_post_cflags
21
-
22
-
23
-
24
- rule link
25
- command = $cxx $in $ldflags -o $out
26
-
27
- build upfirdn2d.o: compile /mnt/hwfile/wangyaohui/projects/LIA-X/LIAX-release/networks/op/upfirdn2d.cpp
28
- build upfirdn2d_kernel.cuda.o: cuda_compile /mnt/hwfile/wangyaohui/projects/LIA-X/LIAX-release/networks/op/upfirdn2d_kernel.cu
29
-
30
-
31
-
32
- build upfirdn2d.so: link upfirdn2d.o upfirdn2d_kernel.cuda.o
33
-
34
- default upfirdn2d.so
35
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
torch_extension/upfirdn2d/upfirdn2d.so DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:277ef4534d19f242b1ee96cdbaf08b638f3fa5f2beadf094c0399c0e17d3990a
3
- size 1390992
 
 
 
 
torch_extension/upfirdn2d/upfirdn2d_kernel.cuda.o DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1d36964bd9f9c07018f4b4761a637b3846c2b5ea6247483ed243b8ed1cff3a2f
3
- size 658616