Instructions to use yuting89830/GAN_AI_hw5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use yuting89830/GAN_AI_hw5 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("yuting89830/GAN_AI_hw5", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload 6 files
Browse files- config.json +44 -0
- diffusion_pytorch_model.safetensors +3 -0
- ema_unet/config.json +44 -0
- ema_unet/diffusion_pytorch_model.safetensors +3 -0
- training_config.json +19 -0
- training_state.pt +3 -0
config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "UNet2DModel",
|
| 3 |
+
"_diffusers_version": "0.37.1",
|
| 4 |
+
"act_fn": "silu",
|
| 5 |
+
"add_attention": true,
|
| 6 |
+
"attention_head_dim": 8,
|
| 7 |
+
"attn_norm_num_groups": null,
|
| 8 |
+
"block_out_channels": [
|
| 9 |
+
128,
|
| 10 |
+
256,
|
| 11 |
+
512
|
| 12 |
+
],
|
| 13 |
+
"center_input_sample": false,
|
| 14 |
+
"class_embed_type": null,
|
| 15 |
+
"down_block_types": [
|
| 16 |
+
"DownBlock2D",
|
| 17 |
+
"DownBlock2D",
|
| 18 |
+
"DownBlock2D"
|
| 19 |
+
],
|
| 20 |
+
"downsample_padding": 1,
|
| 21 |
+
"downsample_type": "conv",
|
| 22 |
+
"dropout": 0.0,
|
| 23 |
+
"flip_sin_to_cos": true,
|
| 24 |
+
"freq_shift": 0,
|
| 25 |
+
"in_channels": 4,
|
| 26 |
+
"layers_per_block": 2,
|
| 27 |
+
"mid_block_scale_factor": 1,
|
| 28 |
+
"mid_block_type": "UNetMidBlock2D",
|
| 29 |
+
"norm_eps": 1e-05,
|
| 30 |
+
"norm_num_groups": 32,
|
| 31 |
+
"num_class_embeds": null,
|
| 32 |
+
"num_train_timesteps": null,
|
| 33 |
+
"out_channels": 4,
|
| 34 |
+
"resnet_time_scale_shift": "default",
|
| 35 |
+
"sample_size": 32,
|
| 36 |
+
"time_embedding_dim": null,
|
| 37 |
+
"time_embedding_type": "positional",
|
| 38 |
+
"up_block_types": [
|
| 39 |
+
"UpBlock2D",
|
| 40 |
+
"UpBlock2D",
|
| 41 |
+
"UpBlock2D"
|
| 42 |
+
],
|
| 43 |
+
"upsample_type": "conv"
|
| 44 |
+
}
|
diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3eee434a8b287b3f19f192c68428eb600390c2bd0d8e51bd6d654916b2d3a1a
|
| 3 |
+
size 230300464
|
ema_unet/config.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "UNet2DModel",
|
| 3 |
+
"_diffusers_version": "0.37.1",
|
| 4 |
+
"act_fn": "silu",
|
| 5 |
+
"add_attention": true,
|
| 6 |
+
"attention_head_dim": 8,
|
| 7 |
+
"attn_norm_num_groups": null,
|
| 8 |
+
"block_out_channels": [
|
| 9 |
+
128,
|
| 10 |
+
256,
|
| 11 |
+
512
|
| 12 |
+
],
|
| 13 |
+
"center_input_sample": false,
|
| 14 |
+
"class_embed_type": null,
|
| 15 |
+
"down_block_types": [
|
| 16 |
+
"DownBlock2D",
|
| 17 |
+
"DownBlock2D",
|
| 18 |
+
"DownBlock2D"
|
| 19 |
+
],
|
| 20 |
+
"downsample_padding": 1,
|
| 21 |
+
"downsample_type": "conv",
|
| 22 |
+
"dropout": 0.0,
|
| 23 |
+
"flip_sin_to_cos": true,
|
| 24 |
+
"freq_shift": 0,
|
| 25 |
+
"in_channels": 4,
|
| 26 |
+
"layers_per_block": 2,
|
| 27 |
+
"mid_block_scale_factor": 1,
|
| 28 |
+
"mid_block_type": "UNetMidBlock2D",
|
| 29 |
+
"norm_eps": 1e-05,
|
| 30 |
+
"norm_num_groups": 32,
|
| 31 |
+
"num_class_embeds": null,
|
| 32 |
+
"num_train_timesteps": null,
|
| 33 |
+
"out_channels": 4,
|
| 34 |
+
"resnet_time_scale_shift": "default",
|
| 35 |
+
"sample_size": 32,
|
| 36 |
+
"time_embedding_dim": null,
|
| 37 |
+
"time_embedding_type": "positional",
|
| 38 |
+
"up_block_types": [
|
| 39 |
+
"UpBlock2D",
|
| 40 |
+
"UpBlock2D",
|
| 41 |
+
"UpBlock2D"
|
| 42 |
+
],
|
| 43 |
+
"upsample_type": "conv"
|
| 44 |
+
}
|
ema_unet/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1bc3e6acbe3333e49c3cd8f63240b778bdbd7b8a8eb73bff45356647aa8e19a6
|
| 3 |
+
size 230300464
|
training_config.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_dir": "public_data/images",
|
| 3 |
+
"output_dir": "steps50000_bs16_lr1e-4_seed42_no_inf100_inferbs32_ema",
|
| 4 |
+
"image_size": 256,
|
| 5 |
+
"batch_size": 16,
|
| 6 |
+
"num_epochs": 100,
|
| 7 |
+
"max_steps": 50000,
|
| 8 |
+
"lr": 0.0001,
|
| 9 |
+
"save_every": 5000,
|
| 10 |
+
"sample_every": 1000,
|
| 11 |
+
"num_preview_samples": 4,
|
| 12 |
+
"preview_inference_steps": 30,
|
| 13 |
+
"resume_from_checkpoint": null,
|
| 14 |
+
"seed": 42,
|
| 15 |
+
"num_workers": 4,
|
| 16 |
+
"mixed_precision": "no",
|
| 17 |
+
"ema_decay": 0.9999,
|
| 18 |
+
"no_ema": false
|
| 19 |
+
}
|
training_state.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc3c345e7da16dd64a4cb620a30066d0ca28dbaf3358e871dd95b323462bff77
|
| 3 |
+
size 691090265
|