feat: add millon js, add models picker dialog, update builder

This commit is contained in:
BennyKok
2024-01-07 17:22:28 +08:00
parent 3c4bce630e
commit 01a9c1a1d6
33 changed files with 1693 additions and 190 deletions
@@ -57,6 +57,7 @@ WORKDIR /
COPY /data/install_deps.py .
COPY /data/deps.json .
COPY /data/models.json .
RUN python3 install_deps.py
WORKDIR /comfyui/custom_nodes
+1 -1
View File
@@ -105,7 +105,7 @@ image = Image.debian_slim()
target_image = image if deploy_test else dockerfile_image
@stub.function(image=target_image, gpu="T4")
@stub.function(image=target_image, gpu=config["gpu"])
def run(input: Input):
import subprocess
import time
+1 -1
View File
@@ -1 +1 @@
config = {"name": "my-app", "deploy_test": "True"}
config = {"name": "my-app", "deploy_test": "True", "gpu": "T4"}
@@ -28,9 +28,10 @@ def check_server(url, retries=50, delay=500):
)
return False
check_server("http://127.0.0.1:8188")
root_url = "http://127.0.0.1:8188"
check_server(root_url)
url = "http://127.0.0.1:8188/customnode/install"
headers = {"Content-Type": "application/json"}
# Load JSON array from deps.json
@@ -39,12 +40,15 @@ with open('deps.json') as f:
# Make a POST request for each package
for package in packages:
response = requests.request("POST", url, json=package, headers=headers)
response = requests.request("POST", f"{root_url}/customnode/install", json=package, headers=headers)
print(response.text)
# restore_snapshot_url = "http://127.0.0.1:8188/snapshot/restore?target=snapshot"
# response = requests.request("GET", restore_snapshot_url, headers=headers)
# print(response.text)
with open('models.json') as f:
models = json.load(f)
for model in models:
response = requests.request("POST", f"{root_url}/model/install", json=model, headers=headers)
print(response.text)
# Close the server
server_process.terminate()
@@ -0,0 +1,12 @@
[
{
"name": "v1-5-pruned-emaonly.ckpt",
"type": "checkpoints",
"base": "SD1.5",
"save_path": "default",
"description": "Stable Diffusion 1.5 base model",
"reference": "https://huggingface.co/runwayml/stable-diffusion-v1-5",
"filename": "v1-5-pruned-emaonly.ckpt",
"url": "https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt"
}
]