Stable-Diffusion-Vertex/hpo/diffusers/vertex-config-diffusers.yaml (22 lines of code) (raw):

# Copyright 2023 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. studySpec: metrics: - metricId: loss goal: MINIMIZE parameters: - parameterId: lr scaleType: UNIT_LOG_SCALE doubleValueSpec: minValue: 0.00001 maxValue: 0.0001 measurementSelectionType: BEST_MEASUREMENT trialJobSpec: workerPoolSpecs: - machineSpec: machineType: n1-standard-8 acceleratorType: NVIDIA_TESLA_V100 acceleratorCount: 1 replicaCount: 1 containerSpec: imageUri: us-central1-docker.pkg.dev/PROJECT_ID/ARTIFACT_REGISTRY_NAME/sd-training:diffusers-hpo args: ["--method","diffuser_dreambooth","--model_name","runwayml/stable-diffusion-v1-5","--input_storage","/gcs/YOUR_BUCKET_NAME/FOLDER","--output_storage","/gcs/YOUR_BUCKET_NAME/FOLDER","--prompt","PROMPT","--class_prompt","CLASS PROMPT","--num_class_images","50","--max_train_steps","100","--text_encoder","True","--set_grads_to_none","True","--hpo","y"] command: ["python3","train.py"]