Views
No views yet
pip install diffusers1import torch
2from diffusers import StableCascadeDecoderPipeline, StableCascadePriorPipeline
3
4prompt = "(extremely aesthetic, best quality, newest), 1girl, solo, cat ears, looking at viewer, blush, light smile, upper body,"
5negative_prompt = "very displeasing, worst quality, monochrome, sketch, blurry, fat, child,"
6
7prior = StableCascadePriorPipeline.from_pretrained("Disty0/sote-diffusion-cascade_pre-alpha0", torch_dtype=torch.float16)
8decoder = StableCascadeDecoderPipeline.from_pretrained("Disty0/sote-diffusion-cascade-decoder_pre-alpha0", torch_dtype=torch.float16)
9
10prior.enable_model_cpu_offload()
11prior_output = prior(
12 prompt=prompt,
13 height=1024,
14 width=1024,
15 negative_prompt=negative_prompt,
16 guidance_scale=6.0,
17 num_images_per_prompt=1,
18 num_inference_steps=40
19)
20
21decoder.enable_model_cpu_offload()
22decoder_output = decoder(
23 image_embeddings=prior_output.image_embeddings,
24 prompt=prompt,
25 negative_prompt=negative_prompt,
26 guidance_scale=2.0,
27 output_type="pil",
28 num_inference_steps=10
29).images[0]
30decoder_output.save("cascade.png")experiment_id: sotediffusion-sc-b_3b
model_version: 3B
dtype: bfloat16
use_fsdp: False
batch_size: 64
grad_accum_steps: 64
updates: 3000
backup_every: 128
save_every: 32
warmup_updates: 100
lr: 4.0e-6
optimizer_type: Adafactor
adaptive_loss_weight: True
stochastic_rounding: True
image_size: 768
multi_aspect_ratio: [1/1, 1/2, 1/3, 2/3, 3/4, 1/5, 2/5, 3/5, 4/5, 1/6, 5/6, 9/16]
shift: 4
checkpoint_path: /mnt/DataSSD/AI/SoteDiffusion/StableCascade/
output_path: /mnt/DataSSD/AI/SoteDiffusion/StableCascade/
webdataset_path: file:/mnt/DataSSD/AI/anime_image_dataset/best/newest_best-{0000..0001}.tar
effnet_checkpoint_path: /mnt/DataSSD/AI/models/sd-cascade/effnet_encoder.safetensors
stage_a_checkpoint_path: /mnt/DataSSD/AI/models/sd-cascade/stage_a.safetensors
generator_checkpoint_path: /mnt/DataSSD/AI/SoteDiffusion/StableCascade/stage_b-generator-049152.safetensors