🐣 Please follow me for new updates https://twitter.com/camenduru
🔥 Please join our discord server https://discord.gg/k5BwmmvJJU
🥳 Please join my patreon community https://patreon.com/camenduru
Colab | Info |
---|---|
ios_emoji_xl_v2_model_colab | |
ios_emoji_xl_v1_model_colab |
Trained with 72x72 pixel apple emojis 😋
GPU = Nvidia A40 (Large) at https://replicate.com
Num examples = 3953
Num batches each epoch = 989
Num Epochs = 2
Instantaneous batch size per device = 4
Total train batch size (w. parallel, distributed & accumulation) = 4
Gradient Accumulation steps = 1
Total optimization steps = 1000
Total Run time: 44.26 minutes
Total Cost: $1.94
Trained with 160x160 pixel ios v16.4 emojis 😋
GPU = Nvidia A40 (Large) at https://replicate.com
Num examples = 4129
Num batches each epoch = 1033
Num Epochs = 1
Instantaneous batch size per device = 4
Total train batch size (w. parallel, distributed & accumulation) = 4
Gradient Accumulation steps = 1
Total optimization steps = 1000
Total Run time: 45.46 minutes
Total Cost: $1.98
https://civitai.com/models/140968/emoji-xl
https://huggingface.co/camenduru/ios-emoji-xl/blob/main/ios_emoji_xl_v2_lora_webui.safetensors
https://huggingface.co/camenduru/ios-emoji-xl/tree/main
- Thanks to
- https://github.com/ignacfetser ❤
- huggingface/diffusers#2326 ❤
- https://github.com/harrywang/finetune-sd/blob/main/convert-to-safetensors.py ❤
pip install safetensors==0.3.3
import re
from safetensors.torch import load_file, save_file
checkpoint = load_file('/content/ui/models/Lora/ios_emoji_xl_v2_lora.safetensors')
new_dict = dict()
for idx, key in enumerate(checkpoint):
new_key = re.sub('\.processor\.', '_', key)
new_key = re.sub('mid_block\.', 'mid_block_', new_key)
new_key = re.sub('_lora.up.', '.lora_up.', new_key)
new_key = re.sub('_lora.down.', '.lora_down.', new_key)
new_key = re.sub('\.(\d+)\.', '_\\1_', new_key)
new_key = re.sub('to_out', 'to_out_0', new_key)
new_key = 'lora_unet_' + new_key
new_dict[new_key] = checkpoint[key]
save_file(new_dict, 'ios_emoji_xl_v2_lora_webui.safetensors')
Thanks to https://github.com/samuelngs/apple-emoji-linux for the 160x160 pixel emojis ❤
Thanks to fofr ❤ for the idea. better model: https://twitter.com/fofrAI/status/1698741974835065171
Thanks to https://replicate.com ❤