thewhole commited on
Commit
be43c31
1 Parent(s): 204a7c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -8,8 +8,6 @@ os.system('pip install ./gaussiansplatting/submodules/diff-gaussian-rasterizatio
8
  os.system('pip install ./gaussiansplatting/submodules/simple-knn')
9
  os.system('pip install git+https://github.com/KAIR-BAIR/[email protected]')
10
  os.system('pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch')
11
- os.system('git clone https://huggingface.co/datasets/tiange/Cap3D')
12
- # os.system('git clone https://huggingface.co/datasets/tiange/Cap3D')
13
 
14
  example_inputs = [[
15
  "A fox."
@@ -32,14 +30,15 @@ example_outputs_1 = [
32
 
33
 
34
 
35
- def main(prompt, CFG, seed):
36
  if [prompt] in example_inputs:
37
  return example_outputs_1[example_inputs.index([prompt])]
38
  seed = int(seed)
 
39
  print('==> User Prompt:', prompt)
40
  timestamp = datetime.now().strftime("@%Y%m%d-%H%M%S")
41
  subprocess.run([
42
- f'python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="{prompt}" seed={seed} system.guidance.guidance_scale={CFG} use_timestamp=False timestamp="{timestamp}" '],
43
  shell=True)
44
  path= os.path.join("./outputs/gaussiandreamer-sd",f'{prompt.replace(" ","_")}{timestamp}',"save/it1200-test.mp4")
45
  print('==> Save path:', path)
@@ -52,6 +51,7 @@ with gr.Blocks() as demo:
52
  Note that this demo is running on A10G, the running time might be longer than the reported 35 minutes (5000 iterations) on A100.<br> \
53
  &copy; This Gradio space was developed by Haodong LI.")
54
  gr.Interface(fn=main, inputs=[gr.Textbox(lines=2, value="A portrait of IRONMAN, white hair, head, photorealistic, 8K, HDR.", label="Your prompt"),
 
55
  gr.Slider(80, 200, value=100, label="CFG"),
56
  gr.Number(value=0, label="Seed")],
57
  outputs=["playable_video"],
 
8
  os.system('pip install ./gaussiansplatting/submodules/simple-knn')
9
  os.system('pip install git+https://github.com/KAIR-BAIR/[email protected]')
10
  os.system('pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch')
 
 
11
 
12
  example_inputs = [[
13
  "A fox."
 
30
 
31
 
32
 
33
+ def main(prompt, iteration,CFG, seed):
34
  if [prompt] in example_inputs:
35
  return example_outputs_1[example_inputs.index([prompt])]
36
  seed = int(seed)
37
+ iteration = int(iteration)
38
  print('==> User Prompt:', prompt)
39
  timestamp = datetime.now().strftime("@%Y%m%d-%H%M%S")
40
  subprocess.run([
41
+ f'python launch.py --config configs/gaussiandreamer-sd.yaml --train --gpu 0 system.prompt_processor.prompt="{prompt}" seed={seed} system.guidance.guidance_scale={CFG} trainer.max_steps={iteration} use_timestamp=False timestamp="{timestamp}" '],
42
  shell=True)
43
  path= os.path.join("./outputs/gaussiandreamer-sd",f'{prompt.replace(" ","_")}{timestamp}',"save/it1200-test.mp4")
44
  print('==> Save path:', path)
 
51
  Note that this demo is running on A10G, the running time might be longer than the reported 35 minutes (5000 iterations) on A100.<br> \
52
  &copy; This Gradio space was developed by Haodong LI.")
53
  gr.Interface(fn=main, inputs=[gr.Textbox(lines=2, value="A portrait of IRONMAN, white hair, head, photorealistic, 8K, HDR.", label="Your prompt"),
54
+ gr.Slider(0, 2000, value=1200, label="Number of iteration"),
55
  gr.Slider(80, 200, value=100, label="CFG"),
56
  gr.Number(value=0, label="Seed")],
57
  outputs=["playable_video"],