mirror of https://github.com/skygpu/skynet.git
Fix enqueue cli for img2img also fix worker img2img input get bug
parent
50ae61c7b2
commit
359e491d1f
|
@ -102,6 +102,7 @@ def download():
|
|||
@click.option('--seed', '-S', default=None)
|
||||
@click.option('--upscaler', '-U', default='x4')
|
||||
@click.option('--binary_data', '-b', default='')
|
||||
@click.option('--strength', '-Z', default=None)
|
||||
def enqueue(
|
||||
reward: str,
|
||||
jobs: int,
|
||||
|
@ -124,11 +125,20 @@ def enqueue(
|
|||
if not kwargs['seed']:
|
||||
kwargs['seed'] = random.randint(0, 10e9)
|
||||
|
||||
binary = kwargs['binary_data']
|
||||
if not kwargs['strength']:
|
||||
if binary:
|
||||
raise ValueError('strength -Z param required if binary data passed')
|
||||
|
||||
del kwargs['strength']
|
||||
|
||||
else:
|
||||
kwargs['strength'] = float(kwargs['strength'])
|
||||
|
||||
req = json.dumps({
|
||||
'method': 'diffuse',
|
||||
'params': kwargs
|
||||
})
|
||||
binary = kwargs['binary_data']
|
||||
|
||||
res = await cleos.a_push_action(
|
||||
'telos.gpu',
|
||||
|
|
|
@ -31,4 +31,3 @@ def load_key(config: dict, key: str) -> str:
|
|||
def set_hf_vars(hf_token: str, hf_home: str):
|
||||
os.environ['HF_TOKEN'] = hf_token
|
||||
os.environ['HF_HOME'] = hf_home
|
||||
os.environ['HUGGINGFACE_HUB_CACHE'] = hf_home
|
||||
|
|
|
@ -288,7 +288,6 @@ class SkynetGPUConnector:
|
|||
if ipfs_link_legacy in results:
|
||||
png_img = results[ipfs_link_legacy]
|
||||
|
||||
png_img = None
|
||||
if ipfs_link in results:
|
||||
png_img = results[ipfs_link]
|
||||
|
||||
|
|
Loading…
Reference in New Issue