fixed colab (+1 squashed commits)

Squashed commits:

[1d1c686f] updated colab and docs
This commit is contained in:
Concedo 2024-03-02 10:02:47 +08:00
parent 0978134f65
commit 59c5448ac8
4 changed files with 222 additions and 56 deletions

View file

@ -962,7 +962,10 @@ Enter Prompt:<br>
response_body = (json.dumps({"object":"list","data":[{"id":friendlymodelname,"object":"model","created":1,"owned_by":"koboldcpp","permission":[],"root":"koboldcpp"}]}).encode())
elif self.path.endswith('/sdapi/v1/sd-models'):
response_body = (json.dumps([{"title":friendlysdmodelname,"model_name":friendlysdmodelname,"hash":"8888888888","sha256":"8888888888888888888888888888888888888888888888888888888888888888","filename":fullsdmodelpath,"config": None}]).encode())
if friendlysdmodelname=="inactive" or fullsdmodelpath=="":
response_body = (json.dumps([]).encode())
else:
response_body = (json.dumps([{"title":friendlysdmodelname,"model_name":friendlysdmodelname,"hash":"8888888888","sha256":"8888888888888888888888888888888888888888888888888888888888888888","filename":fullsdmodelpath,"config": None}]).encode())
elif self.path.endswith('/sdapi/v1/options'):
response_body = (json.dumps({"samples_format":"png","sd_model_checkpoint":friendlysdmodelname}).encode())