Closed NicolasRoehm closed 5 months ago
@NicolasRoehm If you generate image in the Playground
page, you can get it from output logs bellow preview images.
If you use it with API, you can't get the seed. I'll check if it is possible to modify the response schema.
Thank you very much @konieshadow ! Could you please merge branch main
into cog-anime-preset
? :)
Thank you very much @konieshadow ! Could you please merge branch
main
intocog-anime-preset
? :)
The new updates in main
won't bring new features to replicate predict.
Is it possible and / or planned to plug this feature to the replicate predict response ?
Hi @konieshadow I really need this feature and I've never written code in python but maybe if you give me some insights, I can try to help and submit a pull request?
As far as I understand, this line : results = blocking_get_task_result(async_task.job_id)
helps us to fulfil the list output_paths: List[Path] = []
which is the response of the predict
function.
If we change the return type of the predict
function from a list
to an object
as described in the cog documentation like for example :
from cog import BasePredictor, BaseModel, File
class Output(BaseModel):
seed: str
paths: List[Path]
class Predictor(BasePredictor):
def predict(self) -> Output:
return Output(seed=results[0]['seed'], paths=output_paths)
Do you think this can be a solution ? :) Thank you very much
How can I get the generated seed back from Replicate after a successful generation ?