Skip to content

Commit

Permalink
fixing embeddings
Browse files Browse the repository at this point in the history
changed a couple of parameters in api to get rid of useless components
changed gitingore to include embeddings
added embeddings of nfixer.
  • Loading branch information
jacquesfeng123 committed Apr 26, 2023
1 parent e1e15e9 commit 9023f4c
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
__pycache__
*.ckpt
*.pth
/ESRGAN/*
/SwinIR/*
/repositories
Expand All @@ -14,7 +13,6 @@ __pycache__
/outputs
/log
/webui.settings.bat
/embeddings
/styles.csv
/params.txt
/styles.csv.bak
Expand Down
Binary file added embeddings/nartfixer.pt
Binary file not shown.
Binary file added embeddings/nfixer.pt
Binary file not shown.
Binary file added embeddings/nrealfixer.pt
Binary file not shown.
11 changes: 1 addition & 10 deletions modules/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ def img2imgapi(self, img2imgreq: StableDiffusionImg2ImgProcessingAPI):
shared.state.end()

b64images = list(map(encode_pil_to_base64, processed.images)) if send_images else []
print('finished encoding images')

if not img2imgreq.include_init_images:
img2imgreq.init_images = None
Expand Down Expand Up @@ -813,22 +814,12 @@ def invocations(self, req: InvocationsRequest):
elif req.task == 'get-upscalers':
response = self.get_upscalers()
return response
# useless
# elif req.task == 'get-samplers':
# response = self.get_samplers()
# return response
elif req.task == 'interrogate':
response = self.interrogateapi(req.interrogate_payload)
return response
elif req.task == 'get-memory':
response = self.get_memory()
return response
elif req.task == 'get-cmd-flags':
response = self.get_cmd_flags()
return response
elif req.task == 'get-all-config':
response = self.get_all_config()
return response
elif req.task == 'do-nothing':
print("nothing has happened")
return "nothing has happened"
Expand Down
1 change: 0 additions & 1 deletion modules/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ class InvocationsRequest(BaseModel):
extras_single_payload: Optional[ExtrasSingleImageRequest]
extras_batch_payload: Optional[ExtrasBatchImagesRequest]
progress_payload:Optional[ProgressRequest]
interrogate_payload:Optional[InterrogateRequest]
post_options_payload:Optional[dict]

class InvocationsErrorResponse(BaseModel):
Expand Down

0 comments on commit 9023f4c

Please sign in to comment.