ai-forever / ai-forever/ru-dalle
[Colab] Text embedding optimization
- Vorherrschende Sprache
- Jupyter Notebook
- Sterne
- 1.6k
- Forks
- 242
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Input image: https://static8.depositphotos.com/1370441/848/i/600/depositphotos_8486144-stock-photo-beach-and-tropical-sea.jpg
Input text: 'elon musk'
Result: [image](https://scontent-frt3-2.xx.fbcdn.net/v/t39.30808-6/266850659_10215735351777199_4719489214825321057_n.jpg?_nc_cat=101&_nc_rgb565=1&ccb=1-5&_nc_sid=730e14&_nc_ohc=F-dcUV66HngAX-_WQwX&_nc_ht=scontent-frt3-2.xx&oh=00_AT-_oZpQ7XN81wUUtEnn6moUUwvneOtsQ9XHKySKuz3WhA&oe=61C00A55) and [image](https://user-images.githubusercontent.com/40601736/146972487-84ba7258-06c1-4845-8f02-e781ecc7fdb3.png)
Colab that runs out of memory: https://colab.research.google.com/drive/1ancv6fQMrzaz67Ikvfv3wnjlwpWsoebO?usp=sharing
My method is to optimize the text embedding of the transformer, in order to make the output closer to the input image. Same thing as fine-tuning, but optimizing text embeddings, instead of model weights. I had to modify model's forward pass to make it retain the gradient. Sorry for the messy code
Also, I wonder if it's possible to generate the same picture every time? This may be a way to do text-based image modification. I tried removing temperature and filtering, didn't help. Seed is always the same(presumably).
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.