add binary data option to enqueue

pull/9/head
Konstantine Tsafatinos 2023-06-29 19:51:33 -04:00
parent d680ea9b72
commit d862954377
1 changed files with 18 additions and 8 deletions

View File

@ -111,6 +111,7 @@ def download():
@click.option('--step', '-s', default=26) @click.option('--step', '-s', default=26)
@click.option('--seed', '-S', default=None) @click.option('--seed', '-S', default=None)
@click.option('--upscaler', '-U', default='x4') @click.option('--upscaler', '-U', default='x4')
@click.option('--binary_data', '-b', default='')
def enqueue( def enqueue(
account: str, account: str,
permission: str, permission: str,
@ -127,16 +128,25 @@ def enqueue(
'dgpu', node_url, None, None) 'dgpu', node_url, None, None)
with open_cleos(node_url, key=key) as cleos: with open_cleos(node_url, key=key) as cleos:
if not kwargs['seed']: # if not kwargs['seed']:
kwargs['seed'] = random.randint(0, 10e9) # kwargs['seed'] = random.randint(0, 10e9)
#
req = json.dumps({ # req = json.dumps({
'method': 'diffuse', # 'method': 'diffuse',
'params': kwargs # 'params': kwargs
}) # })
binary = '' # binary = ''
for i in range(jobs): for i in range(jobs):
if not kwargs['seed']:
kwargs['seed'] = random.randint(0, 10e9)
req = json.dumps({
'method': 'diffuse',
'params': kwargs
})
binary = kwargs['binary_data']
res = trio.run(cleos.a_push_action, res = trio.run(cleos.a_push_action,
'telos.gpu', 'telos.gpu',
'enqueue', 'enqueue',