Instructions to use ntc-ai/model-glue-sd15-sana-text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Sana
How to use ntc-ai/model-glue-sd15-sana-text with Sana:
# Load the model and infer image from text import torch from app.sana_pipeline import SanaPipeline from torchvision.utils import save_image sana = SanaPipeline("configs/sana_config/1024ms/Sana_1600M_img1024.yaml") sana.from_pretrained("hf://ntc-ai/model-glue-sd15-sana-text") image = sana( prompt='a cyberpunk cat with a neon sign that says "Sana"', height=1024, width=1024, guidance_scale=5.0, pag_guidance_scale=2.0, num_inference_steps=18, ) - Notebooks
- Google Colab
- Kaggle
| { | |
| "metrics": { | |
| "native": { | |
| "clip_text_image_cosine": 0.3082017917186022, | |
| "sampling_seconds": 0.6179222891029591, | |
| "bridge_seconds": 0.0, | |
| "image_rgb_std": 0.2777115295951565, | |
| "image_count": 48, | |
| "quality_pass": true, | |
| "bridge_repeat_bitwise_equal": null, | |
| "native_lpips": 0.0, | |
| "native_pixel_mae": 0.0, | |
| "native_detail_mae": 0.0, | |
| "detail_energy_ratio": 1.0 | |
| }, | |
| "parent": { | |
| "clip_text_image_cosine": 0.30619997655351955, | |
| "sampling_seconds": 0.5849423649196979, | |
| "bridge_seconds": 0.0062157050997484475, | |
| "image_rgb_std": 0.26411043759435415, | |
| "image_count": 48, | |
| "quality_pass": true, | |
| "bridge_repeat_bitwise_equal": true, | |
| "native_lpips": 0.3834717807670434, | |
| "native_pixel_mae": 0.14984353189356625, | |
| "native_detail_mae": 0.03409249125979841, | |
| "detail_energy_ratio": 1.062919204433759 | |
| }, | |
| "linear_uncalibrated": { | |
| "clip_text_image_cosine": 0.30744258500635624, | |
| "sampling_seconds": 0.5833559354844814, | |
| "bridge_seconds": 0.0016241110861301422, | |
| "image_rgb_std": 0.26165843568742275, | |
| "image_count": 48, | |
| "quality_pass": true, | |
| "bridge_repeat_bitwise_equal": true, | |
| "native_lpips": 0.3771136791134874, | |
| "native_pixel_mae": 0.1465170100952188, | |
| "native_detail_mae": 0.03367988064807529, | |
| "detail_energy_ratio": 1.0336223902801673 | |
| }, | |
| "selected": { | |
| "clip_text_image_cosine": 0.3075694603224595, | |
| "sampling_seconds": 0.5856305301519266, | |
| "bridge_seconds": 0.0017263079935219139, | |
| "image_rgb_std": 0.26142118747035664, | |
| "image_count": 48, | |
| "quality_pass": true, | |
| "bridge_repeat_bitwise_equal": true, | |
| "native_lpips": 0.3780206674709916, | |
| "native_pixel_mae": 0.14609215129166842, | |
| "native_detail_mae": 0.03372150473296642, | |
| "detail_energy_ratio": 1.036277251938979 | |
| }, | |
| "repaired_source": { | |
| "clip_text_image_cosine": 0.3081482208023469, | |
| "sampling_seconds": 0.5845581179504128, | |
| "bridge_seconds": 0.0018588434904813766, | |
| "image_rgb_std": 0.2612251853570342, | |
| "image_count": 48, | |
| "quality_pass": true, | |
| "bridge_repeat_bitwise_equal": true, | |
| "native_lpips": 0.37778033611054224, | |
| "native_pixel_mae": 0.14715851237997413, | |
| "native_detail_mae": 0.033508921546551086, | |
| "detail_energy_ratio": 1.0336602094272773 | |
| } | |
| }, | |
| "selected_paired_metrics": { | |
| "native_lpips": { | |
| "candidate_minus_baseline": -0.00545111329605182, | |
| "prompt_bootstrap_95_percent_interval": [ | |
| -0.017689170230490468, | |
| 0.008170036304121215 | |
| ], | |
| "prompt_count": 16, | |
| "prompts_improved": 11, | |
| "per_prompt_deltas": { | |
| "69c6b91f7189f44577d2": 0.019887487093607586, | |
| "978f7cb5fb01bf22523c": 0.007638911406199138, | |
| "9f0be48a1ef2dc4ce885": -0.013423313697179159, | |
| "06dcbd59e5bc658ec580": 0.01774933934211731, | |
| "f6ea3fb9a241d37c4fb6": -0.021033987402915955, | |
| "07075c6a148e625a997a": -0.015316779414812723, | |
| "593e8a026f6a96531c26": -0.00507734219233195, | |
| "f2e1e3d4c4157387c817": -0.004540830850601196, | |
| "18949233e5ae12021263": -0.011010746161142984, | |
| "60db927e2b28e456a102": 0.06870140631993611, | |
| "b71eae96f6d63766bc0f": -0.006747742493947347, | |
| "d85d9a84c873983c21e1": 0.007935047149658203, | |
| "c96cd1fce8e47a2aac9a": -0.00905078649520874, | |
| "740624682fb48ef9de2f": -0.03408389290173849, | |
| "0564e20e17f92949faea": -0.05274855593840281, | |
| "ba346dce185dbc104295": -0.036096026500066124 | |
| } | |
| }, | |
| "native_pixel_mae": { | |
| "candidate_minus_baseline": -0.003751380601897836, | |
| "prompt_bootstrap_95_percent_interval": [ | |
| -0.008547981436519572, | |
| 0.0006537250126712024 | |
| ], | |
| "prompt_count": 16, | |
| "prompts_improved": 10, | |
| "per_prompt_deltas": { | |
| "69c6b91f7189f44577d2": 0.010721762975056967, | |
| "978f7cb5fb01bf22523c": 0.0007752527793248495, | |
| "9f0be48a1ef2dc4ce885": -0.009089951713879904, | |
| "06dcbd59e5bc658ec580": 0.008430302143096924, | |
| "f6ea3fb9a241d37c4fb6": -0.0071954553325970965, | |
| "07075c6a148e625a997a": -0.006219935913880666, | |
| "593e8a026f6a96531c26": -0.002699047327041626, | |
| "f2e1e3d4c4157387c817": 0.001969166100025177, | |
| "18949233e5ae12021263": 0.0006917491555213928, | |
| "60db927e2b28e456a102": 0.009469276914993921, | |
| "b71eae96f6d63766bc0f": -0.010789374510447184, | |
| "d85d9a84c873983c21e1": -0.0003184378147125244, | |
| "c96cd1fce8e47a2aac9a": -0.004497090975443522, | |
| "740624682fb48ef9de2f": -0.01392831156651179, | |
| "0564e20e17f92949faea": -0.027514191965262096, | |
| "ba346dce185dbc104295": -0.009827802578608194 | |
| } | |
| }, | |
| "clip_text_image_cosine": { | |
| "candidate_minus_baseline": 0.001369483768939972, | |
| "prompt_bootstrap_95_percent_interval": [ | |
| -0.0007196499345203237, | |
| 0.0035478313298275064 | |
| ], | |
| "prompt_count": 16, | |
| "prompts_improved": 9, | |
| "per_prompt_deltas": { | |
| "69c6b91f7189f44577d2": -0.008427510658899942, | |
| "978f7cb5fb01bf22523c": -0.001944790283838908, | |
| "9f0be48a1ef2dc4ce885": 0.0018561085065205891, | |
| "06dcbd59e5bc658ec580": 0.0008262892564137777, | |
| "f6ea3fb9a241d37c4fb6": -0.0013627906640370686, | |
| "07075c6a148e625a997a": 0.005472660064697266, | |
| "593e8a026f6a96531c26": 0.0020618836085001626, | |
| "f2e1e3d4c4157387c817": -0.0011492172876993816, | |
| "18949233e5ae12021263": 0.0030751427014668784, | |
| "60db927e2b28e456a102": -0.0015757282574971516, | |
| "b71eae96f6d63766bc0f": -0.0002011259396870931, | |
| "d85d9a84c873983c21e1": 0.012138674656550089, | |
| "c96cd1fce8e47a2aac9a": 0.003370086352030436, | |
| "740624682fb48ef9de2f": 0.0026403963565826416, | |
| "0564e20e17f92949faea": -0.0008615354696909586, | |
| "ba346dce185dbc104295": 0.005993197361628215 | |
| } | |
| } | |
| }, | |
| "selection_frozen_before_test": true, | |
| "remaining_composition_errors": true | |
| } | |