Skip to content

Commit

Permalink
Merge pull request #122 from Haidra-Org/civitai_fix
Browse files Browse the repository at this point in the history
fix: civitai api changes
  • Loading branch information
db0 authored Apr 7, 2024
2 parents 449b50b + 5e020e1 commit 71d316c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion addons/stable_horde_client/civitai_lora_model_fetch.gd
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func _parse_civitai_lora_data(civitai_entry) -> Dictionary:
new_version["unusable"] = 'Attention! This LoRa is unusable because is exceeds the max 230Mb filesize we allow on the AI Horde.'
new_version["images"] = []
for img in version["images"]:
if img["nsfw"] in ["Mature", "X"]:
if img["nsfwLevel"] > 2:
continue
new_version["images"].append(img["url"])
lora_details["versions"][version_id] = new_version
Expand Down
2 changes: 2 additions & 0 deletions addons/stable_horde_client/stable_horde_client.gd
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export(bool) var r2 := true
export(bool) var shared := true
export(String, "none", "canny", "hed", "depth", "normal", "openpose", "seg", "scribble", "fakescribbles", "hough") var control_type := "none"
export(bool) var dry_run := false
export(bool) var replacement_filter := true
export(Array) var workers := []
export(bool) var worker_blacklist := false
export(bool) var allow_downgrade := false
Expand Down Expand Up @@ -159,6 +160,7 @@ func generate(replacement_prompt := '', replacement_params := {}) -> void:
"replacement_filter": false,
"worker_blacklist": worker_blacklist,
"allow_downgrade": allow_downgrade,
"replacement_filter": replacement_filter
# "workers": [
# "dc0704ab-5b42-4c65-8471-561be16ad696", #portal
# ], # debug
Expand Down

0 comments on commit 71d316c

Please sign in to comment.