MohamedRashad commited on
Commit
3712078
·
1 Parent(s): 0467139

Update app.py to refine image generation and adjust demo sharing settings; modify requirements for xformers and restore utils3d dependency

Browse files
app.py CHANGED
@@ -9,9 +9,6 @@ import os
9
  os.environ['SPCONV_ALGO'] = 'native'
10
  from typing import *
11
  import torch
12
- print(torch.__version__)
13
- print(torch.cuda.is_available())
14
- os.system("nvidia-smi")
15
  import numpy as np
16
  import imageio
17
  import uuid
@@ -112,6 +109,9 @@ def generate_item_image(object_t2i_prompt):
112
  trial_id, processed_image = preprocess_pil_image(image)
113
  yield trial_id, processed_image
114
 
 
 
 
115
  def pack_state(gs: Gaussian, mesh: MeshExtractResult, trial_id: str) -> dict:
116
  return {
117
  'gaussian': {
@@ -361,4 +361,4 @@ if __name__ == "__main__":
361
  pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
362
  except:
363
  pass
364
- demo.launch(share=True)
 
9
  os.environ['SPCONV_ALGO'] = 'native'
10
  from typing import *
11
  import torch
 
 
 
12
  import numpy as np
13
  import imageio
14
  import uuid
 
109
  trial_id, processed_image = preprocess_pil_image(image)
110
  yield trial_id, processed_image
111
 
112
+ generate_item_image("A vintage golden pocket watch with intricate floral engravings, polished metal, and Roman numerals on its clock face. Its chain is smooth and reflective, completing the elegant design.")
113
+ print("Done")
114
+
115
  def pack_state(gs: Gaussian, mesh: MeshExtractResult, trial_id: str) -> dict:
116
  return {
117
  'gaussian': {
 
361
  pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
362
  except:
363
  pass
364
+ demo.launch(share=False)
requirements.txt CHANGED
@@ -17,10 +17,10 @@ xatlas==0.0.9
17
  pyvista==0.44.2
18
  pymeshfix==0.17.0
19
  igraph==0.11.8
20
- git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
21
- xformers==0.0.27.post2
22
  spconv-cu120
23
  transformers
24
  gradio_litmodel3d
 
25
  https://huggingface.co/spaces/JeffreyXiang/TRELLIS/resolve/main/wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl?download=true
26
  https://huggingface.co/spaces/JeffreyXiang/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl?download=true
 
17
  pyvista==0.44.2
18
  pymeshfix==0.17.0
19
  igraph==0.11.8
20
+ xformers
 
21
  spconv-cu120
22
  transformers
23
  gradio_litmodel3d
24
+ git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
25
  https://huggingface.co/spaces/JeffreyXiang/TRELLIS/resolve/main/wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl?download=true
26
  https://huggingface.co/spaces/JeffreyXiang/TRELLIS/resolve/main/wheels/nvdiffrast-0.3.3-cp310-cp310-linux_x86_64.whl?download=true
wheels/diff_gaussian_rasterization-0.0.0-cp310-cp310-linux_x86_64.whl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:bd33150078ce0aab90b5628df0c0b6d5792671422cefe5ee2ceb36ff003239d0
3
- size 716362