Run this model with HF Jobs
Run BlinkDL/clip-guided-binary-autoencoder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/BlinkDL/clip-guided-binary-autoencoder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/BlinkDL/clip-guided-binary-autoencoder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use BlinkDL/clip-guided-binary-autoencoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- RWKV
How to use BlinkDL/clip-guided-binary-autoencoder with RWKV:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Commit ·
6f9f76f
1
Parent(s): f573f2d
new model
Browse filesFiles changed (16)
- img_demoAE.py+14-12
- img_test/genshin-out-13bit.pngAdded
- img_test/genshin.pngAdded
- img_test/kodim14-modified-out-13bit.pngAdded
- kodim14-modified.png → img_test/kodim14-modified.pngRenamed
- img_test/kodim19-modified-out-13bit.pngAdded
- kodim19-modified.png → img_test/kodim19-modified.pngRenamed
- img_test/kodim24-modified-out-13bit.pngAdded
- kodim24-modified.png → img_test/kodim24-modified.pngRenamed
- img_test/lena-out-13bit.pngAdded
- img_test/lena.pngAdded
- kodim14-modified-out-13bit.pngDeleted
- kodim19-modified-out-13bit.pngDeleted
- kodim24-modified-out-13bit.pngDeleted
- out-v7c_d8_256-224-13bit-OB32x0.5-226-D.pth → out-v7c_d8_256-224-13bit-OB32x0.5-298-D.pthRenamed+1-1
- out-v7c_d8_256-224-13bit-OB32x0.5-226-E.pth → out-v7c_d8_256-224-13bit-OB32x0.5-298-E.pthRenamed+1-1
13 unmodified lines14151617181718192021125 unmodified lines14714814915015015115215315415515715815916015615715815916016116216316216316416516616416516616716813 unmodified lines
########################################################################################################
model_prefix = 'out-v7c_d8_256-224-13bit-OB32x0.5-226'input_img = 'kodim19-modified.png'model_prefix = 'out-v7c_d8_256-224-13bit-OB32x0.5-298'input_imgs = ['lena.png', 'genshin.png', 'kodim14-modified.png', 'kodim19-modified.png', 'kodim24-modified.png']device = 'cpu' # cpu cuda
########################################################################################################125 unmodified lines
########################################################################################################
print(f'test image {input_img}...')img_transform = transforms.Compose([ transforms.PILToTensor(), transforms.ConvertImageDtype(torch.float), transforms.Resize((224, 224))])
with torch.no_grad(): img = img_transform(Image.open(input_img)).unsqueeze(0).to(device) z = encoder(img) z = ToBinary.apply(z)for input_img in input_imgs: print(f'test image {input_img}...')
with torch.no_grad(): img = img_transform(Image.open(f'img_test/{input_img}')).unsqueeze(0).to(device) z = encoder(img) z = ToBinary.apply(z)
zz = torch.sum(z.squeeze().long() * zpow, dim=0) print(f'Code shape = {zz.shape}\n{zz.cpu().numpy()}\n') out = decoder(z) vision.utils.save_image(out, f"{input_img.split('.')[0]}-out-13bit.png") zz = torch.sum(z.squeeze().long() * zpow, dim=0) print(f'Code shape = {zz.shape}\n{zz.cpu().numpy()}\n') out = decoder(z) vision.utils.save_image(out, f"img_test/{input_img.split('.')[0]}-out-13bit.png")1223version https://git-lfs.github.com/spec/v1oid sha256:2ef336f14ec15ccaf4c1ef25b96b88ca2ee33e105c6275738eabf519e6aae85coid sha256:303a913f6a92286082da49f0b469528008f8585ab5d715114d8d9a2d04fa76efsize 250687601223version https://git-lfs.github.com/spec/v1oid sha256:ce5f83d8f6b35f84a2db5ca29b5502f22e2ce4af7265d18e476e20a79a366406oid sha256:ebdfa80d07808a1ea54176e685dc8321257dd1d574caa361b761cdb795356cabsize 25076297img_demoAE.py+14-12
img_test/genshin-out-13bit.pngAdded

img_test/genshin.pngAdded

img_test/kodim14-modified-out-13bit.pngAdded

kodim14-modified.png → img_test/kodim14-modified.pngRenamed


img_test/kodim19-modified-out-13bit.pngAdded

kodim19-modified.png → img_test/kodim19-modified.pngRenamed


img_test/kodim24-modified-out-13bit.pngAdded

kodim24-modified.png → img_test/kodim24-modified.pngRenamed


img_test/lena-out-13bit.pngAdded

img_test/lena.pngAdded

kodim14-modified-out-13bit.pngDeleted
kodim19-modified-out-13bit.pngDeleted
kodim24-modified-out-13bit.pngDeleted
out-v7c_d8_256-224-13bit-OB32x0.5-226-D.pth → out-v7c_d8_256-224-13bit-OB32x0.5-298-D.pthRenamed+1-1
out-v7c_d8_256-224-13bit-OB32x0.5-226-E.pth → out-v7c_d8_256-224-13bit-OB32x0.5-298-E.pthRenamed+1-1