Run this model with HF Jobs
Run ModelsLab/blipdiffusion 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/ModelsLab/blipdiffusion. 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/ModelsLab/blipdiffusion 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 ModelsLab/blipdiffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ModelsLab/blipdiffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ModelsLab/blipdiffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (20)
- README.mdAdded+198
- controlnet/config.jsonAdded+41
- controlnet/diffusion_pytorch_model.safetensorsAdded+3
- image_processor/preprocessor_config.jsonAdded+24
- model_index.jsonAdded+43
- qformer/config.jsonAdded+248
- qformer/pytorch_model.binAdded+3
- scheduler/scheduler_config.jsonAdded+13
- text_encoder/config.jsonAdded+25
- text_encoder/pytorch_model.binAdded+3
- tokenizer/merges.txtAdded
- tokenizer/special_tokens_map.jsonAdded+24
- tokenizer/tokenizer_config.jsonAdded+33
- tokenizer/vocab.jsonAdded
- unet/config.jsonAdded+61
- unet/diffusion_pytorch_model.binAdded+3
- vae/config.jsonAdded+31
- vae/diffusion_pytorch_model.binAdded+3
- vision_encoder/config.jsonAdded+20
- vision_encoder/pytorch_model.binAdded+3
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198---license: apache-2.0language:- enlibrary_name: diffusers---# BLIP-Diffusion: Pre-trained Subject Representation for Controllable Text-to-Image Generation and Editing
<!-- Provide a quick summary of what the model is/does. -->
Model card for BLIP-Diffusion, a text to image Diffusion model which enables zero-shot subject-driven generation and control-guided zero-shot generation.
The abstract from the paper is:
*Subject-driven text-to-image generation models create novel renditions of an input subject based on text prompts. Existing models suffer from lengthy fine-tuning and difficulties preserving the subject fidelity. To overcome these limitations, we introduce BLIP-Diffusion, a new subject-driven image generation model that supports multimodal control which consumes inputs of subject images and text prompts. Unlike other subject-driven generation models, BLIP-Diffusion introduces a new multimodal encoder which is pre-trained to provide subject representation. We first pre-train the multimodal encoder following BLIP-2 to produce visual representation aligned with the text. Then we design a subject representation learning task which enables a diffusion model to leverage such visual representation and generates new subject renditions. Compared with previous methods such as DreamBooth, our model enables zero-shot subject-driven generation, and efficient fine-tuning for customized subject with up to 20x speedup. We also demonstrate that BLIP-Diffusion can be flexibly combined with existing techniques such as ControlNet and prompt-to-prompt to enable novel subject-driven generation and editing applications.*
The model is created by Dongxu Li, Junnan Li, Steven C.H. Hoi.
### Model Sources
<!-- Provide the basic links for the model. -->
- **Original Repository:** https://github.com/salesforce/LAVIS/tree/main- **Project Page:** https://dxli94.github.io/BLIP-Diffusion-website/
## Uses
### Zero-Shot Subject Driven Generation```pythonfrom diffusers.pipelines import BlipDiffusionPipelinefrom diffusers.utils import load_imageimport torch
blip_diffusion_pipe = BlipDiffusionPipeline.from_pretrained( "Salesforce/blipdiffusion", torch_dtype=torch.float16).to("cuda")
cond_subject = "dog"tgt_subject = "dog"text_prompt_input = "swimming underwater"
cond_image = load_image( "https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/dog.jpg")
iter_seed = 88888guidance_scale = 7.5num_inference_steps = 25negative_prompt = "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, out of frame, ugly, bad anatomy, bad proportions, deformed, blurry, duplicate"
output = blip_diffusion_pipe( text_prompt_input, cond_image, cond_subject, tgt_subject, guidance_scale=guidance_scale, num_inference_steps=num_inference_steps, neg_prompt=negative_prompt, height=512, width=512,).imagesoutput[0].save("image.png")```Input Image : <img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/dog.jpg" style="width:500px;"/>
Generatred Image : <img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/dog_underwater.png" style="width:500px;"/>
### Controlled subject-driven generation
```pythonfrom diffusers.pipelines import BlipDiffusionControlNetPipelinefrom diffusers.utils import load_imagefrom controlnet_aux import CannyDetector
blip_diffusion_pipe = BlipDiffusionControlNetPipeline.from_pretrained( "Salesforce/blipdiffusion-controlnet", torch_dtype=torch.float16).to("cuda")
style_subject = "flower" # subject that defines the styletgt_subject = "teapot" # subject to generate.text_prompt = "on a marble table"
cldm_cond_image = load_image( "https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/kettle.jpg").resize((512, 512))canny = CannyDetector()cldm_cond_image = canny(cldm_cond_image, 30, 70, output_type="pil")style_image = load_image( "https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/flower.jpg")
guidance_scale = 7.5num_inference_steps = 50negative_prompt = "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, out of frame, ugly, bad anatomy, bad proportions, deformed, blurry, duplicate"
output = blip_diffusion_pipe( text_prompt, style_image, cldm_cond_image, style_subject, tgt_subject, guidance_scale=guidance_scale, num_inference_steps=num_inference_steps, neg_prompt=negative_prompt, height=512, width=512,).imagesoutput[0].save("image.png")```
Input Style Image : <img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/flower.jpg" style="width:500px;"/>Canny Edge Input : <img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/kettle.jpg" style="width:500px;"/>Generated Image : <img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/canny_generated.png" style="width:500px;"/>
### Controlled subject-driven generation Scribble```pythonfrom diffusers.pipelines import BlipDiffusionControlNetPipelinefrom diffusers.utils import load_imagefrom controlnet_aux import HEDdetector
blip_diffusion_pipe = BlipDiffusionControlNetPipeline.from_pretrained( "Salesforce/blipdiffusion-controlnet")controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-scribble")blip_diffusion_pipe.controlnet = controlnetblip_diffusion_pipe.to("cuda")
style_subject = "flower" # subject that defines the styletgt_subject = "bag" # subject to generate.text_prompt = "on a table"cldm_cond_image = load_image( "https://huggingface.co/lllyasviel/sd-controlnet-scribble/resolve/main/images/bag.png").resize((512, 512))hed = HEDdetector.from_pretrained("lllyasviel/Annotators")cldm_cond_image = hed(cldm_cond_image)style_image = load_image( "https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/flower.jpg")
guidance_scale = 7.5num_inference_steps = 50negative_prompt = "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, out of frame, ugly, bad anatomy, bad proportions, deformed, blurry, duplicate"
output = blip_diffusion_pipe( text_prompt, style_image, cldm_cond_image, style_subject, tgt_subject, guidance_scale=guidance_scale, num_inference_steps=num_inference_steps, neg_prompt=negative_prompt, height=512, width=512,).imagesoutput[0].save("image.png")```
Input Style Image : <img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/flower.jpg" style="width:500px;"/>Scribble Input : <img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/scribble.png" style="width:500px;"/>Generated Image : <img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/scribble_output.png" style="width:500px;"/>
## Model Architecture
Blip-Diffusion learns a **pre-trained subject representation**. uch representation aligns with text embeddings and in the meantime also encodes the subject appearance. This allows efficient fine-tuning of the model for high-fidelity subject-driven applications, such as text-to-image generation, editing and style transfer.
To this end, they design a two-stage pre-training strategy to learn generic subject representation. In the first pre-training stage, they perform multimodal representation learning, which enforces BLIP-2 to produce text-aligned visual features based on the input image. In the second pre-training stage, they design a subject representation learning task, called prompted context generation, where the diffusion model learns to generate novel subject renditions based on the input visual features.
To achieve this, they curate pairs of input-target images with the same subject appearing in different contexts. Specifically, they synthesize input images by composing the subject with a random background. During pre-training, they feed the synthetic input image and the subject class label through BLIP-2 to obtain the multimodal embeddings as subject representation. The subject representation is then combined with a text prompt to guide the generation of the target image.

The architecture is also compatible to integrate with established techniques built on top of the diffusion model, such as ControlNet.
They attach the U-Net of the pre-trained ControlNet to that of BLIP-Diffusion via residuals. In this way, the model takes into account the input structure condition, such as edge maps and depth maps, in addition to the subject cues. Since the model inherits the architecture of the original latent diffusion model, they observe satisfying generations using off-the-shelf integration with pre-trained ControlNet without further training.
<img src="https://huggingface.co/datasets/ayushtues/blipdiffusion_images/resolve/main/arch_controlnet.png" style="width:50%;"/>
## Citation
**BibTeX:**
If you find this repository useful in your research, please cite:
```@misc{li2023blipdiffusion, title={BLIP-Diffusion: Pre-trained Subject Representation for Controllable Text-to-Image Generation and Editing}, author={Dongxu Li and Junnan Li and Steven C. H. Hoi}, year={2023}, eprint={2305.14720}, archivePrefix={arXiv}, primaryClass={cs.CV}}```
1234567891011121314151617181920212223242526272829303132333435363738394041{ "_class_name": "ControlNetModel", "_diffusers_version": "0.14.0.dev0", "act_fn": "silu", "attention_head_dim": 8, "block_out_channels": [ 320, 640, 1280, 1280 ], "class_embed_type": null, "conditioning_embedding_out_channels": [ 16, 32, 96, 256 ], "controlnet_conditioning_channel_order": "rgb", "cross_attention_dim": 768, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 4, "layers_per_block": 2, "mid_block_scale_factor": 1, "norm_eps": 1e-05, "norm_num_groups": 32, "num_class_embeds": null, "only_cross_attention": false, "projection_class_embeddings_input_dim": null, "resnet_time_scale_shift": "default", "upcast_attention": false, "use_linear_projection": false}123version https://git-lfs.github.com/spec/v1oid sha256:e19821a00e6d1817b37286a21d5c4f8915076949b0e81846c4f92c96ffb46db7size 1445157124123456789101112131415161718192021222324{ "do_center_crop": true, "do_convert_rgb": true, "do_normalize": true, "do_rescale": true, "do_resize": true, "image_mean": [ 0.48145466, 0.4578275, 0.40821073 ], "image_processor_type": "BlipImageProcessor", "image_std": [ 0.26862954, 0.26130258, 0.27577711 ], "resample": 3, "rescale_factor": 0.00392156862745098, "size": { "height": 224, "width": 224 }}12345678910111213141516171819202122232425262728293031323334353637383940414243{ "_class_name": "BlipDiffusionPipeline", "_diffusers_version": "0.18.0.dev0", "ctx_begin_pos": 2, "image_processor": [ "blip_diffusion", "BlipImageProcessor" ], "mean": [ 0.48145466, 0.4578275, 0.40821073 ], "qformer": [ "blip_diffusion", "Blip2QFormerModel" ], "scheduler": [ "diffusers", "PNDMScheduler" ], "std": [ 0.26862954, 0.26130258, 0.27577711 ], "text_encoder": [ "blip_diffusion", "ContextCLIPTextModel" ], "tokenizer": [ "transformers", "CLIPTokenizer" ], "unet": [ "diffusers", "UNet2DConditionModel" ], "vae": [ "diffusers", "AutoencoderKL" ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248{ "_commit_hash": null, "_name_or_path": "./blip2diffusion/qformer", "architectures": [ "Blip2QFormerModel" ], "initializer_factor": 1.0, "initializer_range": 0.02, "model_type": "blip-2", "num_query_tokens": 16, "qformer_config": { "_name_or_path": "", "add_cross_attention": false, "architectures": null, "attention_probs_dropout_prob": 0.1, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": null, "chunk_size_feed_forward": 0, "cross_attention_frequency": 1, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_sample": false, "early_stopping": false, "encoder_hidden_size": 1024, "encoder_no_repeat_ngram_size": 0, "eos_token_id": null, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "initializer_range": 0.02, "intermediate_size": 3072, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "layer_norm_eps": 1e-12, "length_penalty": 1.0, "max_length": 20, "max_position_embeddings": 512, "min_length": 0, "model_type": "blip_2_qformer", "no_repeat_ngram_size": 0, "num_attention_heads": 12, "num_beam_groups": 1, "num_beams": 1, "num_hidden_layers": 12, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": 0, "position_embedding_type": "absolute", "prefix": null, "problem_type": null, "pruned_heads": {}, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "sep_token_id": null, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": true, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torch_dtype": null, "torchscript": false, "transformers_version": "4.31.0", "typical_p": 1.0, "use_bfloat16": false, "vocab_size": 30523 }, "text_config": { "_name_or_path": "", "_remove_final_layer_norm": false, "activation_function": "relu", "add_cross_attention": false, "architectures": null, "attention_dropout": 0.0, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": 2, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_layer_norm_before": true, "do_sample": false, "dropout": 0.1, "early_stopping": false, "enable_bias": true, "encoder_no_repeat_ngram_size": 0, "eos_token_id": 2, "exponential_decay_length_penalty": null, "ffn_dim": 3072, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "hidden_size": 768, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "init_std": 0.02, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "layer_norm_elementwise_affine": true, "layerdrop": 0.0, "length_penalty": 1.0, "max_length": 20, "max_position_embeddings": 2048, "min_length": 0, "model_type": "opt", "no_repeat_ngram_size": 0, "num_attention_heads": 12, "num_beam_groups": 1, "num_beams": 1, "num_hidden_layers": 12, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": 1, "prefix": null, "problem_type": null, "pruned_heads": {}, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "sep_token_id": null, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": true, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torch_dtype": null, "torchscript": false, "transformers_version": "4.31.0", "typical_p": 1.0, "use_bfloat16": false, "use_cache": true, "vocab_size": 50272, "word_embed_proj_dim": 768 }, "torch_dtype": "float32", "transformers_version": null, "use_decoder_only_language_model": true, "vision_config": { "_name_or_path": "", "add_cross_attention": false, "architectures": null, "attention_dropout": 0.0, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": null, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_sample": false, "early_stopping": false, "encoder_no_repeat_ngram_size": 0, "eos_token_id": null, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "hidden_act": "quick_gelu", "hidden_size": 1024, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "image_size": 224, "initializer_range": 1e-10, "intermediate_size": 4096, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "layer_norm_eps": 1e-05, "length_penalty": 1.0, "max_length": 20, "min_length": 0, "model_type": "blip_2_vision_model", "no_repeat_ngram_size": 0, "num_attention_heads": 16, "num_beam_groups": 1, "num_beams": 1, "num_hidden_layers": 23, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": null, "patch_size": 14, "prefix": null, "problem_type": null, "pruned_heads": {}, "qkv_bias": true, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "sep_token_id": null, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": true, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torch_dtype": null, "torchscript": false, "transformers_version": "4.31.0", "typical_p": 1.0, "use_bfloat16": false }}123version https://git-lfs.github.com/spec/v1oid sha256:709f641c6a2b4a932c51e57f14ebcb3b270efd9bbf31db0c34af7c208aa06bc6size 197616266512345678910111213{ "_class_name": "PNDMScheduler", "_diffusers_version": "0.16.0", "beta_end": 0.012, "beta_schedule": "scaled_linear", "beta_start": 0.00085, "num_train_timesteps": 1000, "prediction_type": "epsilon", "set_alpha_to_one": false, "skip_prk_steps": true, "steps_offset": 0, "trained_betas": null}12345678910111213141516171819202122232425{ "_name_or_path": "cache/models--runwayml--stable-diffusion-v1-5", "architectures": [ "ContextCLIPTextModel" ], "attention_dropout": 0.0, "bos_token_id": 0, "dropout": 0.0, "eos_token_id": 2, "hidden_act": "quick_gelu", "hidden_size": 768, "initializer_factor": 1.0, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-05, "max_position_embeddings": 77, "model_type": "clip_text_model", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 1, "projection_dim": 768, "torch_dtype": "float32", "transformers_version": "4.32.1", "vocab_size": 49408}123version https://git-lfs.github.com/spec/v1oid sha256:b374042419b2a5a28e7ee94503ff233719c7bd1345f5896ad982fdeff7c8ccccsize 492307041123456789101112131415161718192021222324{ "bos_token": { "content": "<|startoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "pad_token": "<|endoftext|>", "unk_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233{ "add_prefix_space": false, "bos_token": { "__type": "AddedToken", "content": "<|startoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "clean_up_tokenization_spaces": true, "do_lower_case": true, "eos_token": { "__type": "AddedToken", "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "errors": "replace", "model_max_length": 77, "pad_token": "<|endoftext|>", "tokenizer_class": "CLIPTokenizer", "unk_token": { "__type": "AddedToken", "content": "<|endoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061{ "_class_name": "UNet2DConditionModel", "_diffusers_version": "0.16.0", "_name_or_path": "./blipdiffusion_hf_ckpt/", "act_fn": "silu", "addition_embed_type": null, "addition_embed_type_num_heads": 64, "attention_head_dim": 8, "block_out_channels": [ 320, 640, 1280, 1280 ], "center_input_sample": false, "class_embed_type": null, "class_embeddings_concat": false, "conv_in_kernel": 3, "conv_out_kernel": 3, "cross_attention_dim": 768, "cross_attention_norm": null, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "dual_cross_attention": false, "encoder_hid_dim": null, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 4, "layers_per_block": 2, "mid_block_only_cross_attention": null, "mid_block_scale_factor": 1, "mid_block_type": "UNetMidBlock2DCrossAttn", "norm_eps": 1e-05, "norm_num_groups": 32, "num_class_embeds": null, "only_cross_attention": false, "out_channels": 4, "projection_class_embeddings_input_dim": null, "resnet_out_scale_factor": 1.0, "resnet_skip_time_act": false, "resnet_time_scale_shift": "default", "sample_size": 64, "time_cond_proj_dim": null, "time_embedding_act_fn": null, "time_embedding_dim": null, "time_embedding_type": "positional", "timestep_post_act": null, "up_block_types": [ "UpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D" ], "upcast_attention": false, "use_linear_projection": false}123version https://git-lfs.github.com/spec/v1oid sha256:c42d7cf4e4f028e3c955e13f4406231c946b602329de281b67c214f5efcb5137size 343836637312345678910111213141516171819202122232425262728293031{ "_class_name": "AutoencoderKL", "_diffusers_version": "0.16.0", "_name_or_path": "./blipdiffusion_hf_ckpt/", "act_fn": "silu", "block_out_channels": [ 128, 256, 512, 512 ], "down_block_types": [ "DownEncoderBlock2D", "DownEncoderBlock2D", "DownEncoderBlock2D", "DownEncoderBlock2D" ], "in_channels": 3, "latent_channels": 4, "layers_per_block": 2, "norm_num_groups": 32, "out_channels": 3, "sample_size": 512, "scaling_factor": 0.18215, "up_block_types": [ "UpDecoderBlock2D", "UpDecoderBlock2D", "UpDecoderBlock2D", "UpDecoderBlock2D" ]}123version https://git-lfs.github.com/spec/v1oid sha256:af27ea858349760ebe3311953e0bfe8d6fd257dc9537ae0b2b938c262132a2c6size 3347118571234567891011121314151617181920{ "_name_or_path": "E:/diffusers/cache/vit", "architectures": [ "Blip2VisionModel" ], "attention_dropout": 0.0, "hidden_act": "quick_gelu", "hidden_size": 1024, "image_size": 224, "initializer_range": 1e-10, "intermediate_size": 4096, "layer_norm_eps": 1e-05, "model_type": "blip_2_vision_model", "num_attention_heads": 16, "num_hidden_layers": 23, "patch_size": 14, "qkv_bias": true, "torch_dtype": "float32", "transformers_version": "4.31.0"}123version https://git-lfs.github.com/spec/v1oid sha256:84e3623a20ab1912527e682ca0467f1260599e845a69731335e5482f10482150size 1162423609README.mdAdded+198
controlnet/config.jsonAdded+41
controlnet/diffusion_pytorch_model.safetensorsAdded+3
image_processor/preprocessor_config.jsonAdded+24
model_index.jsonAdded+43
qformer/config.jsonAdded+248
qformer/pytorch_model.binAdded+3
scheduler/scheduler_config.jsonAdded+13
text_encoder/config.jsonAdded+25
text_encoder/pytorch_model.binAdded+3
tokenizer/merges.txtAdded
tokenizer/special_tokens_map.jsonAdded+24
tokenizer/tokenizer_config.jsonAdded+33
tokenizer/vocab.jsonAdded
unet/config.jsonAdded+61
unet/diffusion_pytorch_model.binAdded+3
vae/config.jsonAdded+31
vae/diffusion_pytorch_model.binAdded+3
vision_encoder/config.jsonAdded+20
vision_encoder/pytorch_model.binAdded+3