Instructions to use Yuanshi/LinFusion-2-1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Yuanshi/LinFusion-2-1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Yuanshi/LinFusion-2-1", 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 Settings
- Draw Things
- DiffusionBee
| { | |
| "_class_name": "LinFusion", | |
| "_diffusers_version": "0.30.0", | |
| "modules_list": [ | |
| { | |
| "dim_n": 320, | |
| "heads": 5, | |
| "module_name": "down_blocks.0.attentions.0.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 320, | |
| "heads": 5, | |
| "module_name": "down_blocks.0.attentions.1.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 640, | |
| "heads": 10, | |
| "module_name": "down_blocks.1.attentions.0.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 640, | |
| "heads": 10, | |
| "module_name": "down_blocks.1.attentions.1.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 1280, | |
| "heads": 20, | |
| "module_name": "down_blocks.2.attentions.0.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 1280, | |
| "heads": 20, | |
| "module_name": "down_blocks.2.attentions.1.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 1280, | |
| "heads": 20, | |
| "module_name": "up_blocks.1.attentions.0.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 1280, | |
| "heads": 20, | |
| "module_name": "up_blocks.1.attentions.1.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 1280, | |
| "heads": 20, | |
| "module_name": "up_blocks.1.attentions.2.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 640, | |
| "heads": 10, | |
| "module_name": "up_blocks.2.attentions.0.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 640, | |
| "heads": 10, | |
| "module_name": "up_blocks.2.attentions.1.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 640, | |
| "heads": 10, | |
| "module_name": "up_blocks.2.attentions.2.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 320, | |
| "heads": 5, | |
| "module_name": "up_blocks.3.attentions.0.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 320, | |
| "heads": 5, | |
| "module_name": "up_blocks.3.attentions.1.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 320, | |
| "heads": 5, | |
| "module_name": "up_blocks.3.attentions.2.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| }, | |
| { | |
| "dim_n": 1280, | |
| "heads": 20, | |
| "module_name": "mid_block.attentions.0.transformer_blocks.0.attn1", | |
| "projection_mid_dim": null | |
| } | |
| ] | |
| } | |