Instructions to use ndtran0101/pisa-sr-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ndtran0101/pisa-sr-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ndtran0101/pisa-sr-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| { | |
| "source_checkpoint": "pisa_sr.pkl (csslc/PiSA-SR, CVPR 2025)", | |
| "base_model": "stabilityai/stable-diffusion-2-1-base", | |
| "rank_pix": 4, | |
| "rank_sem": 4, | |
| "lora_alpha": { | |
| "pix": 8.0, | |
| "sem": 8.0 | |
| }, | |
| "n_target_modules_per_branch": 258, | |
| "merge_precision": "fp32 on CPU, cast to fp16 once at the end", | |
| "inference": { | |
| "timestep": 1, | |
| "prompt": "", | |
| "noise": "none (deterministic)", | |
| "formula": "latent_out = z - unet(z, t=1, emb(''))", | |
| "adjustable": "lambda_pix*pred_pix + lambda_sem*(pred_sem - pred_pix)" | |
| } | |
| } |