Instructions to use ksyint/mountain_landscape with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ksyint/mountain_landscape with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import AutoPipelineForInpainting from diffusers.utils import load_image # switch to "mps" for apple devices pipe = AutoPipelineForInpainting.from_pretrained("ksyint/mountain_landscape", dtype=torch.float16, device_map="cuda") img_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo.png" mask_url = "https://raw.githubusercontent.com/CompVis/latent-diffusion/main/data/inpainting_examples/overture-creations-5sI6fQgYIuo_mask.png" image = load_image(img_url).resize((1024, 1024)) mask_image = load_image(mask_url).resize((1024, 1024)) prompt = "a tiger sitting on a park bench" generator = torch.Generator(device="cuda").manual_seed(0) image = pipe( prompt=prompt, image=image, mask_image=mask_image, guidance_scale=8.0, num_inference_steps=20, # steps between 15 and 30 work well for us strength=0.99, # make sure to use `strength` below 1.0 generator=generator, ).images[0] - Notebooks
- Google Colab
- Kaggle
Download text_encoder/config.json from ksyint/mountain_landscape: direct link, hf CLI and curl.
- Browser
- Download file 631 Bytes
-
https://huggingface.co/ksyint/mountain_landscape/resolve/main/text_encoder/config.json
- Command line
-
hf download hf://ksyint/mountain_landscape/text_encoder/config.json
-
curl -L -o config.json https://huggingface.co/ksyint/mountain_landscape/resolve/main/text_encoder/config.json
631 Bytes
| { | |
| "_name_or_path": "/root/pro_train/style1_moutain_landscape/text_encoder", | |
| "architectures": [ | |
| "CLIPTextModel" | |
| ], | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "dropout": 0.0, | |
| "eos_token_id": 2, | |
| "hidden_act": "gelu", | |
| "hidden_size": 1024, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4096, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 77, | |
| "model_type": "clip_text_model", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 23, | |
| "pad_token_id": 1, | |
| "projection_dim": 512, | |
| "torch_dtype": "float16", | |
| "transformers_version": "4.37.2", | |
| "vocab_size": 49409 | |
| } | |