From cbc9a89bb8cb665091d9356db57bfe403dc20c15 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Mon, 12 Jun 2023 09:43:27 -0300 Subject: [PATCH] Fix old hardcoded domain on img2img input data fetcher --- skynet/dgpu/network.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skynet/dgpu/network.py b/skynet/dgpu/network.py index e7e0396..466dc59 100644 --- a/skynet/dgpu/network.py +++ b/skynet/dgpu/network.py @@ -14,6 +14,7 @@ from contextlib import asynccontextmanager as acm from leap.cleos import CLEOS from leap.sugar import Checksum256, Name, asset_from_str +from skynet.constants import DEFAULT_DOMAIN from skynet.dgpu.errors import DGPUComputeError from skynet.ipfs import get_ipfs_file @@ -220,8 +221,8 @@ class SkynetGPUConnector: if ipfs_hash == '': return b'' - resp = await get_ipfs_file(f'https://ipfs.ancap.tech/ipfs/{ipfs_hash}/image.png') - if resp.status_code != 200: + resp = await get_ipfs_file(f'https://ipfs.{DEFAULT_DOMAIN}/ipfs/{ipfs_hash}/image.png') + if not resp: raise DGPUComputeError('Couldn\'t gather input data from ipfs') return resp.raw