Instructions to use chenzeyang1/T with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use chenzeyang1/T with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("chenzeyang1/T", torch_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
File size: 1,121 Bytes
a8a0738 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | try:
from .language_model.llava_llama import LlavaLlamaForCausalLM, LlavaConfig
from .language_model.llava_mpt import LlavaMptForCausalLM, LlavaMptConfig
from .language_model.llava_mistral import LlavaMistralForCausalLM, LlavaMistralConfig
from .edit_mapper import (
LightweightEditMapper,
MGIEStyleEditMapper,
EditMapper,
create_edit_mapper,
match_dtype_to_model
)
from .img_token_utils import (
add_img_tokens_to_tokenizer,
resize_token_embeddings_and_init,
setup_llava_trainable_params_mgie_style,
save_tokenizer_with_img_tokens,
verify_img_token_setup,
verify_model_dtype_consistency,
get_img_token_ids,
extract_img_token_hiddens,
create_img_token_mask,
)
from .unet_processors import (
LoRALinear,
DecoupledDualBranchAttnProcessor,
inject_decoupled_processors,
get_trainable_unet_params
)
from .dual_branch_unet import (
DualBranchUNet,
DualBranchUNetWithLoRA,
create_dual_branch_unet
)
except:
pass
|