Instructions to use bart1259/CityDiffusion2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use bart1259/CityDiffusion2 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("bart1259/CityDiffusion2", 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
Publish app-compatible EMA U-Net and scheduler
Browse files
scheduler/scheduler_config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "DDPMScheduler",
|
| 3 |
+
"num_train_timesteps": 1000,
|
| 4 |
+
"beta_start": 0.0001,
|
| 5 |
+
"beta_end": 0.02,
|
| 6 |
+
"beta_schedule": "squaredcos_cap_v2",
|
| 7 |
+
"trained_betas": null,
|
| 8 |
+
"variance_type": "fixed_small",
|
| 9 |
+
"clip_sample": true,
|
| 10 |
+
"prediction_type": "v_prediction",
|
| 11 |
+
"thresholding": false,
|
| 12 |
+
"dynamic_thresholding_ratio": 0.995,
|
| 13 |
+
"clip_sample_range": 1.0,
|
| 14 |
+
"sample_max_value": 1.0,
|
| 15 |
+
"timestep_spacing": "leading",
|
| 16 |
+
"steps_offset": 0,
|
| 17 |
+
"rescale_betas_zero_snr": false
|
| 18 |
+
}
|
config.json → unet_ema/config.json
RENAMED
|
File without changes
|
diffusion_pytorch_model.safetensors → unet_ema/diffusion_pytorch_model.safetensors
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 352872876
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0af9bc8cee5504bd0e1571cd64b7263567dc464f9503a8a5bad5d98d56abd6cd
|
| 3 |
size 352872876
|