Views
No views yet



1# Building the pipeline with the Fined-tuned model from Hugging Face
2from diffusers import DiffusionPipeline
3
4pipeline = DiffusionPipeline.from_pretrained("vwu142/fine-tuned-pokemon-and-pokemon-card-generator-13000")
5pipeline.scheduler = DPMSolverMultistepScheduler.from_config(pipeline.scheduler.config)
6pipeline = pipeline.to("cuda")
7
8# Image generation
9prompt = "A Pokemon Card of the format tag team,with pokemon of type dragon and ghost with the title Gratina in the Tag Team form from Sun & Moon with an Electric type Pikachu as the buddy of the Tag Team"
10images = pipeline(prompt).images
11images
121!accelerate launch diffusers/examples/text_to_image/train_text_to_image.py \
2 --pretrained_model_name_or_path=$MODEL_NAME \
3 --dataset_name=$dataset_name --caption_column="caption"\
4 --use_ema \
5 --use_8bit_adam \
6 --resolution=512 --center_crop --random_flip \
7 --train_batch_size=1 \
8 --gradient_accumulation_steps=8 \
9 --gradient_checkpointing \
10 --mixed_precision="fp16" \
11 --max_train_steps=$max_training_epochs \
12 --learning_rate=1e-05 \
13 --max_grad_norm=1 \
14 --lr_scheduler="constant" --lr_warmup_steps=0 \
15 --output_dir="pokemon-card-model"