Upload DDPMPipeline
Browse files- logs/ddpm-paintings-128-finetuned-celebahq/events.out.tfevents.1701751022.coffee.35880.0 +3 -0
- logs/ddpm-paintings-128-finetuned-celebahq/events.out.tfevents.1701751066.coffee.35898.0 +3 -0
- main.py +10 -9
- samples/0006.png +0 -0
- samples/0007.png +0 -0
- samples/0008.png +0 -0
- unet/diffusion_pytorch_model.safetensors +1 -1
logs/ddpm-paintings-128-finetuned-celebahq/events.out.tfevents.1701751022.coffee.35880.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f3ca76973e3bd06df52930b3c2b423cfe0f6cf35af062234948e5b210ce1e02f
|
3 |
+
size 578
|
logs/ddpm-paintings-128-finetuned-celebahq/events.out.tfevents.1701751066.coffee.35898.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:83a9f81eddbab442b993b57b935313fe44ca41361aa46442ccdce71ddefd8edf
|
3 |
+
size 427942
|
main.py
CHANGED
@@ -90,25 +90,26 @@ if __name__ == '__main__':
|
|
90 |
'google/ddpm-celebahq-256'
|
91 |
)
|
92 |
"""
|
93 |
-
|
94 |
"""
|
95 |
-
unet=UNet2DModel.from_pretrained(
|
96 |
-
'jmemon/ddpm-paintings-128-finetuned-celebahq'
|
|
|
97 |
).to('mps')
|
98 |
|
99 |
scheduler = DDPMScheduler.from_pretrained(
|
100 |
'jmemon/ddpm-paintings-128-finetuned-celebahq'
|
101 |
)
|
102 |
"""
|
103 |
-
|
104 |
unet = UNet2DModel.from_pretrained(
|
105 |
-
str(Path(__file__).parent / 'unet')
|
|
|
106 |
).to('mps')
|
107 |
|
108 |
scheduler = DDPMScheduler.from_pretrained(
|
109 |
str(Path(__file__).parent / 'scheduler')
|
110 |
)
|
111 |
-
|
112 |
lora_config = LoraConfig(
|
113 |
r=8,
|
114 |
lora_alpha=8,
|
@@ -141,7 +142,7 @@ if __name__ == '__main__':
|
|
141 |
|
142 |
global_step = 0
|
143 |
|
144 |
-
for epoch in range(
|
145 |
pbar = tqdm(total=len(train_dataloader), disable=not accelerator.is_local_main_process)
|
146 |
pbar.set_description(f'Epoch {epoch}')
|
147 |
|
@@ -204,7 +205,7 @@ if __name__ == '__main__':
|
|
204 |
model_loc = 'jmemon/ddpm-paintings-128-finetuned-celebahq'
|
205 |
else:
|
206 |
_pipeline.save_pretrained(config.output_dir)
|
207 |
-
model_loc = str(Path(__file__).parent / 'diffusion_model_pytorch.
|
208 |
|
209 |
-
unet = UNet2DModel.from_pretrained(model_loc)
|
210 |
lora_unet = get_peft_model(unet, lora_config)
|
|
|
90 |
'google/ddpm-celebahq-256'
|
91 |
)
|
92 |
"""
|
|
|
93 |
"""
|
94 |
+
unet = UNet2DModel.from_pretrained(
|
95 |
+
'jmemon/ddpm-paintings-128-finetuned-celebahq',
|
96 |
+
use_safetensors=True
|
97 |
).to('mps')
|
98 |
|
99 |
scheduler = DDPMScheduler.from_pretrained(
|
100 |
'jmemon/ddpm-paintings-128-finetuned-celebahq'
|
101 |
)
|
102 |
"""
|
103 |
+
|
104 |
unet = UNet2DModel.from_pretrained(
|
105 |
+
str(Path(__file__).parent / 'unet'),
|
106 |
+
use_safetensors=True
|
107 |
).to('mps')
|
108 |
|
109 |
scheduler = DDPMScheduler.from_pretrained(
|
110 |
str(Path(__file__).parent / 'scheduler')
|
111 |
)
|
112 |
+
|
113 |
lora_config = LoraConfig(
|
114 |
r=8,
|
115 |
lora_alpha=8,
|
|
|
142 |
|
143 |
global_step = 0
|
144 |
|
145 |
+
for epoch in range(6, config.num_epochs + 6):
|
146 |
pbar = tqdm(total=len(train_dataloader), disable=not accelerator.is_local_main_process)
|
147 |
pbar.set_description(f'Epoch {epoch}')
|
148 |
|
|
|
205 |
model_loc = 'jmemon/ddpm-paintings-128-finetuned-celebahq'
|
206 |
else:
|
207 |
_pipeline.save_pretrained(config.output_dir)
|
208 |
+
model_loc = str(Path(__file__).parent / 'diffusion_model_pytorch.safetensors')
|
209 |
|
210 |
+
unet = UNet2DModel.from_pretrained(model_loc, use_safetensors=True)
|
211 |
lora_unet = get_peft_model(unet, lora_config)
|
samples/0006.png
ADDED
samples/0007.png
ADDED
samples/0008.png
ADDED
unet/diffusion_pytorch_model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 454741108
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3a9bda38d316357ab00e56ccd00fec9186f490a6e9e91dcbc7b504735faf45ea
|
3 |
size 454741108
|