Instructions to use hf-internal-testing/tiny-random-cogview4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hf-internal-testing/tiny-random-cogview4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-random-cogview4", 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
- Local Apps
- Draw Things
- DiffusionBee
| { | |
| "_class_name": "CogView4Transformer2DModel", | |
| "_diffusers_version": "0.33.0.dev0", | |
| "attention_head_dim": 4, | |
| "condition_dim": 4, | |
| "in_channels": 4, | |
| "num_attention_heads": 4, | |
| "num_layers": 2, | |
| "out_channels": 4, | |
| "patch_size": 2, | |
| "pos_embed_max_size": 128, | |
| "rope_axes_dim": [ | |
| 256, | |
| 256 | |
| ], | |
| "sample_size": 128, | |
| "text_embed_dim": 32, | |
| "time_embed_dim": 8 | |
| } | |