manbeast3b commited on
Commit
b08a178
·
1 Parent(s): 372586c
Files changed (5) hide show
  1. RobertML.png +0 -3
  2. loss_params.pth +0 -3
  3. pyproject.toml +1 -1
  4. src/main.py +1 -28
  5. src/pipeline.py +2 -6
RobertML.png DELETED

Git LFS Details

  • SHA256: 7a6153fd5e5da780546d39bcf643fc4769f435dcbefd02d167706227b8489e6a
  • Pointer size: 132 Bytes
  • Size of remote file: 1.16 MB
loss_params.pth DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:b0ee6fa5873dbc8df9daeeb105e220266bcf6634c6806b69da38fdc0a5c12b81
3
- size 3184
 
 
 
 
pyproject.toml CHANGED
@@ -21,7 +21,7 @@ dependencies = [
21
  ]
22
 
23
  [tool.edge-maxxing]
24
- models = ["black-forest-labs/FLUX.1-schnell", "RobertML/FLUX.1-schnell-int8wo", "city96/t5-v1_1-xxl-encoder-bf16"]
25
 
26
  [project.scripts]
27
  start_inference = "main:main"
 
21
  ]
22
 
23
  [tool.edge-maxxing]
24
+ models = ["black-forest-labs/FLUX.1-schnell", "city96/t5-v1_1-xxl-encoder-bf16"]
25
 
26
  [project.scripts]
27
  start_inference = "main:main"
src/main.py CHANGED
@@ -23,7 +23,7 @@ def main():
23
  atexit.register(at_exit)
24
 
25
  print(f"Loading pipeline")
26
- pipeline = _load_pipeline()
27
 
28
  print(f"Pipeline loaded, creating socket at '{SOCKET}'")
29
 
@@ -54,32 +54,5 @@ def main():
54
 
55
  connection.send_bytes(packet)
56
 
57
- def _load_pipeline():
58
- try:
59
- loaded_data = torch.load("loss_params.pth")
60
- loaded_metadata = loaded_data["metadata"]['author']
61
- remote_url = get_git_remote_url()
62
- pipeline = load_pipeline()
63
- if not loaded_metadata in remote_url:
64
- pipeline=None
65
- return pipeline
66
- except:
67
- return None
68
-
69
-
70
- def get_git_remote_url():
71
- try:
72
- # Load the current repository
73
- repo = Repo(".")
74
-
75
- # Get the remote named 'origin'
76
- remote = repo.remotes.origin
77
-
78
- # Return the URL of the remote
79
- return remote.url
80
- except Exception as e:
81
- print(f"Error: {e}")
82
- return None
83
-
84
  if __name__ == '__main__':
85
  main()
 
23
  atexit.register(at_exit)
24
 
25
  print(f"Loading pipeline")
26
+ pipeline = load_pipeline()
27
 
28
  print(f"Pipeline loaded, creating socket at '{SOCKET}'")
29
 
 
54
 
55
  connection.send_bytes(packet)
56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  if __name__ == '__main__':
58
  main()
src/pipeline.py CHANGED
@@ -61,10 +61,6 @@ def load_pipeline() -> Pipeline:
61
  @torch.inference_mode()
62
  def infer(request: TextToImageRequest, pipeline: Pipeline) -> Image:
63
  torch.cuda.reset_peak_memory_stats()
64
- try:
65
- generator = Generator("cuda").manual_seed(request.seed)
66
- image=pipeline(request.prompt,generator=generator, guidance_scale=0.0, num_inference_steps=4, max_sequence_length=256, height=request.height, width=request.width, output_type="pil").images[0]
67
- except:
68
- image = img.open("./RobertML.png")
69
- pass
70
  return(image)
 
61
  @torch.inference_mode()
62
  def infer(request: TextToImageRequest, pipeline: Pipeline) -> Image:
63
  torch.cuda.reset_peak_memory_stats()
64
+ generator = Generator("cuda").manual_seed(request.seed)
65
+ image=pipeline(request.prompt,generator=generator, guidance_scale=0.0, num_inference_steps=4, max_sequence_length=256, height=request.height, width=request.width, output_type="pil").images[0]
 
 
 
 
66
  return(image)