Spaces:
Build error
Build error
Update app.py
Browse files9 unmodified lines1011121314151617131415161718192033 unmodified lines545556575859605758596046 unmodified lines1071081091131101111121139 unmodified linesdtype = torch.bfloat16device = "cuda" if torch.cuda.is_available() else "cpu"
taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)good_vae = AutoencoderKL.from_pretrained("black-forest-labs/FLUX.1-dev", subfolder="vae", torch_dtype=dtype).to(device)pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=dtype, vae=taef1).to(device)torch.cuda.empty_cache()
pipe = SanaSprintPipeline.from_pretrained( "Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers", torch_dtype=torch.bfloat16)pipe.to(device)MAX_SEED = np.iinfo(np.int32).maxMAX_IMAGE_SIZE = 2048
33 unmodified lineswith gr.Blocks(css=css) as demo: with gr.Column(elem_id="col-container"): gr.Markdown(f"""# FLUX.1 [dev]12B param rectified flow transformer guidance-distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/) [[non-commercial license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-dev)] """) gr.Markdown(f"""# Sana Sprint""") with gr.Row(): 46 unmodified lines minimum=1, maximum=15, step=0.1, value=3.5, value=1, ) num_inference_steps = gr.Slider(app.py+7-10