We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
executor = ThreadPoolExecutor()
# 异步调用 process_relight 函数 processed_fg, results = await async_process_relight( input_fg=input_fg, prompt=prompt, image_width=image_width, image_height=image_height, num_samples=num_samples, seed=seed, steps=steps, a_prompt=a_prompt, n_prompt=n_prompt, cfg=cfg, highres_scale=highres_scale, highres_denoise=highres_denoise, lowres_denoise=lowres_denoise, bg_source=bg_source )
async def async_process_relight(input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source): loop = asyncio.get_event_loop() # 使用 *args 传递位置参数,而不是关键字参数 return await loop.run_in_executor( executor, process_relight, input_fg, prompt, image_width, image_height, num_samples, seed, steps, a_prompt, n_prompt, cfg, highres_scale, highres_denoise, lowres_denoise, bg_source )
These codes can do async call process_relight ok. But don't create result image at the same time.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
executor = ThreadPoolExecutor()
These codes can do async call process_relight ok. But don't create result image at the same time.
The text was updated successfully, but these errors were encountered: