mirror of https://github.com/skygpu/skynet.git
Fix old hardcoded domain on img2img input data fetcher
parent
1e05357a72
commit
cbc9a89bb8
|
@ -14,6 +14,7 @@ from contextlib import asynccontextmanager as acm
|
||||||
|
|
||||||
from leap.cleos import CLEOS
|
from leap.cleos import CLEOS
|
||||||
from leap.sugar import Checksum256, Name, asset_from_str
|
from leap.sugar import Checksum256, Name, asset_from_str
|
||||||
|
from skynet.constants import DEFAULT_DOMAIN
|
||||||
|
|
||||||
from skynet.dgpu.errors import DGPUComputeError
|
from skynet.dgpu.errors import DGPUComputeError
|
||||||
from skynet.ipfs import get_ipfs_file
|
from skynet.ipfs import get_ipfs_file
|
||||||
|
@ -220,8 +221,8 @@ class SkynetGPUConnector:
|
||||||
if ipfs_hash == '':
|
if ipfs_hash == '':
|
||||||
return b''
|
return b''
|
||||||
|
|
||||||
resp = await get_ipfs_file(f'https://ipfs.ancap.tech/ipfs/{ipfs_hash}/image.png')
|
resp = await get_ipfs_file(f'https://ipfs.{DEFAULT_DOMAIN}/ipfs/{ipfs_hash}/image.png')
|
||||||
if resp.status_code != 200:
|
if not resp:
|
||||||
raise DGPUComputeError('Couldn\'t gather input data from ipfs')
|
raise DGPUComputeError('Couldn\'t gather input data from ipfs')
|
||||||
|
|
||||||
return resp.raw
|
return resp.raw
|
||||||
|
|
Loading…
Reference in New Issue