Instructions to use Efficient-Large-Model/Sol-H3-VAE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Efficient-Large-Model/Sol-H3-VAE with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Efficient-Large-Model/Sol-H3-VAE", 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: 999 Bytes
775b8fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | """Process-local SM120 fix for FlashAttention-4 (4.0.0b19-b22) varlen forward.
On SM120 (RTX 5090, DGX Spark) surplus scheduler work tiles could read sequence
metadata past the batch. _spark_flash_fwd_guarded.py is FA4's flash_fwd.py with that
guard added; the installed FA4 package and valid-tile computation stay unchanged.
"""
from flash_attn.cute import interface
from flash_attn.cute.cache_utils import JITCache
from flash_attn.cute.flash_fwd_sm120 import FlashAttentionForwardSm120
from _spark_flash_fwd_guarded import FlashAttentionForwardSm80
class SparkFlashAttentionForwardSm120(FlashAttentionForwardSm120):
kernel = FlashAttentionForwardSm80.kernel
def enable_sm120_guard():
if interface.FlashAttentionForwardSm120 is SparkFlashAttentionForwardSm120:
return
interface.FlashAttentionForwardSm120 = SparkFlashAttentionForwardSm120
# Never reuse an unguarded binary from an existing in-memory/disk cache.
interface._flash_attn_fwd.compile_cache = JITCache()
|