gokaygokay commited on
Commit
e4c2f62
·
1 Parent(s): abf941c
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -19,6 +19,7 @@ from trellis.pipelines import TrellisImageTo3DPipeline
19
  from trellis.representations import Gaussian, MeshExtractResult
20
  from trellis.utils import render_utils, postprocessing_utils
21
 
 
22
  # Constants
23
  MAX_SEED = np.iinfo(np.int32).max
24
  TMP_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'tmp')
@@ -273,9 +274,11 @@ with gr.Blocks() as demo:
273
  if __name__ == "__main__":
274
  # Initialize Flux pipeline
275
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
276
  flux_pipeline = DiffusionPipeline.from_pretrained(
277
  "black-forest-labs/FLUX.1-dev",
278
- torch_dtype=torch.bfloat16
 
279
  )
280
  flux_pipeline.load_lora_weights("gokaygokay/Flux-Game-Assets-LoRA-v2")
281
  flux_pipeline = flux_pipeline.to(device)
 
19
  from trellis.representations import Gaussian, MeshExtractResult
20
  from trellis.utils import render_utils, postprocessing_utils
21
 
22
+ huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
23
  # Constants
24
  MAX_SEED = np.iinfo(np.int32).max
25
  TMP_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'tmp')
 
274
  if __name__ == "__main__":
275
  # Initialize Flux pipeline
276
  device = "cuda" if torch.cuda.is_available() else "cpu"
277
+ huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
278
  flux_pipeline = DiffusionPipeline.from_pretrained(
279
  "black-forest-labs/FLUX.1-dev",
280
+ torch_dtype=torch.bfloat16,
281
+ token = huggingface_token
282
  )
283
  flux_pipeline.load_lora_weights("gokaygokay/Flux-Game-Assets-LoRA-v2")
284
  flux_pipeline = flux_pipeline.to(device)