wjs0725 commited on
Commit
6f9f2a8
·
verified ·
1 Parent(s): 0431cbe

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -230,16 +230,16 @@ def create_demo(model_name: str, device: str = "cuda" if torch.cuda.is_available
230
  return demo
231
 
232
 
233
- if __name__ == "__main__":
234
- import argparse
235
- parser = argparse.ArgumentParser(description="Flux")
236
- parser.add_argument("--name", type=str, default="flux-dev", choices=list(configs.keys()), help="Model name")
237
- parser.add_argument("--device", type=str, default="cuda" if torch.cuda.is_available() else "cpu", help="Device to use")
238
- parser.add_argument("--offload", action="store_true", help="Offload model to CPU when not in use")
239
- parser.add_argument("--share", action="store_true", help="Create a public link to your demo")
240
-
241
- parser.add_argument("--port", type=int, default=41035)
242
- args = parser.parse_args()
243
-
244
- demo = create_demo(args.name, args.device, args.offload)
245
- demo.launch()
 
230
  return demo
231
 
232
 
233
+ # if __name__ == "__main__":
234
+ # import argparse
235
+ # parser = argparse.ArgumentParser(description="Flux")
236
+ # # parser.add_argument("--name", type=str, default="flux-dev", choices=list(configs.keys()), help="Model name")
237
+ # # parser.add_argument("--device", type=str, default="cuda" if torch.cuda.is_available() else "cpu", help="Device to use")
238
+ # # parser.add_argument("--offload", action="store_true", help="Offload model to CPU when not in use")
239
+ # # parser.add_argument("--share", action="store_true", help="Create a public link to your demo")
240
+
241
+ # # parser.add_argument("--port", type=int, default=41035)
242
+ # # args = parser.parse_args()
243
+
244
+ demo = create_demo("flux-dev", "cuda", False)
245
+ demo.launch()