Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
kning committed Mar 29, 2024
1 parent 7747a64 commit 5bec755
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions 06_gpu_and_ml/comfyui/workflow_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def download_image(url, save_path="/root/input/"):
try:
response = requests.get(url)
response.raise_for_status()
pathlib.Path(save_path + url.split('/')[-1]).write_bytes(response.content)
pathlib.Path(save_path + url.split("/")[-1]).write_bytes(
response.content
)
print(f"{url} image successfully downloaded")

except Exception as e:
Expand All @@ -71,11 +73,11 @@ def run_python_workflow(item: Dict):
VAEDecode,
VAEEncodeForInpaint,
)

download_image(item["image"])
with torch.inference_mode():
loadimage = LoadImage()
loadimage_1 = loadimage.load_image(image=item["image"].split('/')[-1])
loadimage_1 = loadimage.load_image(image=item["image"].split("/")[-1])

checkpointloadersimple = CheckpointLoaderSimple()
checkpointloadersimple_2 = checkpointloadersimple.load_checkpoint(
Expand Down

0 comments on commit 5bec755

Please sign in to comment.