I want to make a video from images saved in Google Drive using “Hailuo.ai”.
I am also using “piapi.ai” to connect to the “Hailuo.ai” API.
The video prompt is written in a Google spreadsheet.
We’ve created a new category for help with designing workflows, and I’ve moved your question there: Help me Build my Workflow. Find out how this category works by reading this topic.
Can anyone implement a workflow?
Never used this api, so I can just guess how it works.
- the api needs an
image_url
, so no download file is required. I replaced it with share: file operation. - The merge 2 inputs, you need the Merge node.
Thank you.
I will try it.
Also, there are multiple images. The video prompt also has the same number of images.
For example, I want to process prompt 1 for image 1 and prompt 2 for image 2.
I would also like to include loop processing when acquiring images and when generating videos.
Is it possible to create a workflow that takes the above two points into consideration?
In this case, I would first read the prompts and use either the line number or the prompt itself to load the image or generate the image URL. Then, this information would be passed on to the API.
However, there’s an issue with the Wait Node. It stops functioning correctly if there is more than one item. To address this, it would need to be separated into its own workflow. This isn’t a problem though and can be managed easily.
I suggest including the Upload File and Share File nodes in the loop as well, so that the files are uploaded immediately.
When it comes to handling failed processes, it’s a bit tricky. You could handle it in this way, but there’s a risk of quickly ending up in an endless loop.
Personally, I prefer a different approach: storing the failed processes, analyzing what went wrong, and then processing these specific cases in a separate workflow. This could be done either with or without making adjustments to the prompt or the image.
Thank you for checking.
I tried adding a loop process, but I don’t know how to set it up in ➀, ②, and ③.
How should I set up and build the workflow?
I was able to solve ① and ②, but it’s taking a long time to build a flow to re-execute the failed image when ③ “fails”.
Please help.
Can you share the workflow? Not only an image of it?
I will share the workflow json file.
There are two things I would like you to build.
- Loop processing when “failed”. I would like to run only the failed files again.
- I would like the video file to be saved in Google Drive.
Hailuo has completed the process of generating the video.
I don’t have an account with Piapi, so I can only make guesses. But I’m sure you’ll handle it just fine.
About the endless loops: They occur when the same item is repeatedly processed by the same workflow without any changes or adjustments. If there haven’t been any temporary issues, then the same error will keep appearing over and over.
Thank you for checking.
I created a workflow based on the sample.
Is this workflow okay?
Does the workflow successfully run when using When Executed by Another Workflow for a prompt
and an image_url
?
If it does, then there is a high chance it will work universally.
However, the image_url1 node relies on values from nodes that are only executed within the Schedule path, so it will definitely fail on retry.
Would it make sense to use my workflow and adjust the Google nodes so that the prompts and images are loaded directly from your Google Drive? Are there any issues with this approach?
Can you enable saving failed executions
And check what failed?
When you pin an image_url and a prompt to the Execute Workflow Trigger and hover over the node, than you can start workflow with the pinned data and debug the subworkflow.
The error no longer occurs.
There is one thing that concerns me.
There are 100 items for 10 images and 10 prompts.
(Ignore the error because it’s just a screenshot from earlier.)
Also, in the above workflow, there is 1 item. Is 10 items correct?
10 images and 10 prompts with all combination are 100 unique items.
The Combine By can be changed to Position to match the items by their position. This matches the first item from input1 with the first item from input2, second item from input1 with second item from input 2.