Download One-to-All-Animation/benchmark/DisCo/tool/test_SD2 from SignerX/StableSigner: direct link, hf CLI and curl.
- Browser
- Download file 805 Bytes
-
https://huggingface.co/datasets/SignerX/StableSigner/resolve/main/One-to-All-Animation/benchmark/DisCo/tool/test_SD2
- Command line
-
hf download hf://datasets/SignerX/StableSigner/One-to-All-Animation/benchmark/DisCo/tool/test_SD2
-
curl -L -o test_SD2 https://huggingface.co/datasets/SignerX/StableSigner/resolve/main/One-to-All-Animation/benchmark/DisCo/tool/test_SD2
805 Bytes
| import requests | |
| import torch | |
| from PIL import Image | |
| from io import BytesIO | |
| from diffusers import StableUnCLIPImg2ImgPipeline | |
| #Start the StableUnCLIP Image variations pipeline | |
| pipe = StableUnCLIPImg2ImgPipeline.from_pretrained( | |
| "/datadrive_d/wangtan/azure_storage/vigstandard_data/linjli/debug_output/video_sythesis/diffusers/stable-diffusion-2-1-unclip", torch_dtype=torch.float16, variation="fp16" | |
| ) | |
| pipe = pipe.to("cuda") | |
| #Get image from URL | |
| url = "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/stable_unclip/tarsila_do_amaral.png" | |
| response = requests.get(url) | |
| init_image = Image.open(BytesIO(response.content)).convert("RGB") | |
| #Pipe to make the variation | |
| images = pipe(init_image, height=256, width=256).images | |
| images[0].save("/home/tan/tarsila_variation.png") |