Uh oh!
There was an error while loading. Please reload this page.
WIP: Retrieval Augmented Diffusion Models - #1846
Conversation
isamu-isozaki
commented
Dec 28, 2022
I found that huggingface datasets library already has faiss integration. Trying to figure out how to combine with CLIPVisionModel now |
isamu-isozaki
commented
Dec 28, 2022
@patil-suraj Hi! I moved to this branch. I started working on the retrieval class. Will keep working/testing on it tomorrow |
isamu-isozaki
commented
Dec 29, 2022
I think I almost got the retrieval class working. Will prob finish today and push then work on the training script tomorrow. Will also post example results |
isamu-isozaki
commented
Dec 29, 2022
Success! I'll update scripts and push |
isamu-isozaki
commented
Dec 29, 2022
isamu-isozaki
commented
Dec 29, 2022
Next I'll start making a training script |
isamu-isozaki
commented
Dec 29, 2022
I'll try using clip-retrieval tool by laion too as an option for training. I'll double check paper on the implementation then I'll go ahead and train |
neverix
commented
Dec 31, 2022
I get ValueError: Thecomponent<class'transformers.models.clip.image_processing_clip.CLIPImageProcessor'>of<class'diffusers.pipelines.rdm.pipeline_rdm.RDMPipeline'>cannotbeloadedasitdoesnotseemtohaveanyoftheloadingmethodsdefinedin {'ModelMixin': ['save_pretrained', 'from_pretrained'], 'SchedulerMixin': ['save_config', 'from_config'], 'DiffusionPipeline': ['save_pretrained', 'from_pretrained'], 'OnnxRuntimeModel': ['save_pretrained', 'from_pretrained'], 'PreTrainedTokenizer': ['save_pretrained', 'from_pretrained'], 'PreTrainedTokenizerFast': ['save_pretrained', 'from_pretrained'], 'PreTrainedModel': ['save_pretrained', 'from_pretrained'], 'FeatureExtractionMixin': ['save_pretrained', 'from_pretrained']}.with |
isamu-isozaki
commented
Dec 31, 2022
@neverix or ? |
isamu-isozaki
commented
Dec 31, 2022
I'll try to reproduce the problem and let you know. It is pretty weird since the ImageProcessor does not have a load from pretrained method so it's pretty weird trying to load it. |
I get it in the model creation step, so there's not much of a difference |
isamu-isozaki
commented
Jan 1, 2023
@neverix tnx was able to reproduce. I'll try figuring out a fix tomorrow |
isamu-isozaki
commented
Jan 1, 2023
Interesting I got the same result when I did |
isamu-isozaki
commented
Feb 26, 2023
ok! I made some changes so the retriever can index with a general model if given the argument given moco, simclr, ibot etc. Next, I will wrap out the training/inference |
isamu-isozaki
commented
Feb 26, 2023
once that's done I'll fix the checks! |
isamu-isozaki
commented
Feb 26, 2023
This is for my personal research but I also will try adding ibot embeddings support too. Honestly I doubt anything will need changing |
isamu-isozaki
commented
Feb 26, 2023
I think I'll remove clip-retrieval from the script for now since
|
isamu-isozaki
commented
Feb 27, 2023
Cleaned up the inference script some more. I think a lot of the common funcs I'll abstract away into some common files like datasets just to avoid copying code wrongly. |
isamu-isozaki
commented
Feb 27, 2023
tomorrow I'll hopefully finish cleaning up the training scripts and might ask for a review again! |
isamu-isozaki
commented
Feb 27, 2023
Not finished yet but some notes
|
isamu-isozaki
commented
Feb 27, 2023
Anyways stopping a bit here for now but will resume tomorrow! |
@patrickvonplaten@patil-suraj Hi! I think the training scripts might take a while so I can move them to a separate pr for an easier review! |
isamu-isozaki
commented
Mar 2, 2023
For now, will be cleaning anyway! |
williamberman
commented
Mar 21, 2023
hey @isamu-isozaki if we could isolate the PR to just the pipeline and remove the collosalai pipeline and the training scripts that would be helpful for getting the PR merged |
isamu-isozaki
commented
Mar 21, 2023
@williamberman Got it! Sounds good. Will do tomorrow |
isamu-isozaki
commented
Mar 22, 2023
@williamberman Hi! Just confirming but do you think I should keep the inference scripts? Can remove them too! |
isamu-isozaki
commented
Mar 22, 2023
Let me remove it for now. |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
isamu-isozaki
commented
Apr 15, 2023
Ah, let me clean up a bit more |
isamu-isozaki
commented
Apr 27, 2023
sorry got a bit preoccupied. Let me close this pr and open it once I clean up some things |
un1tz3r0
commented
Apr 27, 2023
Hi so i believe i implemented something similar using clip retrieval back in the days of disco-diffusion (we've come such a long way since then) I took care to implement an asyncio based high performance paralell downloader, it can grab thousands of images from the URLs returned by clip-retrieval in pretty reasonable time. The repo is here un1tz3r0/anythingdiffusion |
@un1tz3r0 nice! Looks awesome thanks |
Pulled code from patil's branch to start making the retriever class and training script for rdm. I'll base this code on
https://github.com/afiaka87/retrieval-augmented-diffusion
and
CompVis/latent-diffusion#111