MichalGeyer / plug-and-play

Official Pytorch Implementation for “Plug-and-Play Diffusion Features for Text-Driven Image-to-Image Translation” (CVPR 2023)
939 stars 58 forks source link

Add Replicate demo and API #12

Closed ArielReplicate closed 1 year ago

ArielReplicate commented 1 year ago

Hey @MichalGeyer, @tnarek ! đź‘‹

Thanks for this very cool project. Image translation is always fun and this one shows great results!

This pull request makes it possible to run your model inside a Docker environment, which makes it easier for other people to run it. We're using an open source tool called Cog to make this process easier.

This also means we can make a web page where other people can run your model! View it here: https://replicate.com/arielreplicate/plug_and_play_image_translation

Replicate also have an API, so people can easily run your model from their code:

import replicate
model = replicate.models.get("arielreplicate/plug_and_play_image_translation")
output_images = model.predict(input_image=<path_to_image>, translation_prompts='p1;p2;p3')

where other control parameters are available (see API tab in the demo page). I Also want to thank you for the help in answering my question and say that we can work together to add more control parameters to the demo (n_inversion_steps, etc.) If you'd like to modify the Replicate page on your own, let me know and I can transfer ownership to your account.

If you're only interested in the REAMDE link you can go ahead and only add it.

In case you're interested, In Replicate, where we're trying to make machine learning reproducible. We got frustrated that we couldn't run all the really interesting ML work being done. So, we're going round implementing models we like. blush

tnarek commented 1 year ago

Hi @ArielReplicate,

That's amazing! Thank you very much for the implementation!