Add sample_start_step setting to configure when sampling starts (#949)
Co-authored-by: Jaret Burkett <jaretburkett@gmail.com>
This commit is contained in:
@@ -70,6 +70,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -72,6 +72,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -85,6 +85,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
# I leave half blank to test prompt and unprompted
|
||||
|
||||
@@ -81,6 +81,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -73,6 +73,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -78,6 +78,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -129,6 +129,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -75,6 +75,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -70,6 +70,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -79,6 +79,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -72,6 +72,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -86,6 +86,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -70,6 +70,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -68,6 +68,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -69,6 +69,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -70,6 +70,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
# you can provide up to 3 control images here
|
||||
|
||||
@@ -68,6 +68,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
samples:
|
||||
|
||||
@@ -71,6 +71,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch" # must match train.noise_scheduler
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
prompts:
|
||||
|
||||
@@ -80,6 +80,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch"
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 832
|
||||
height: 480
|
||||
num_frames: 40
|
||||
|
||||
@@ -69,6 +69,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch"
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 832
|
||||
height: 480
|
||||
num_frames: 40
|
||||
|
||||
@@ -80,6 +80,7 @@ config:
|
||||
sample:
|
||||
sampler: "flowmatch"
|
||||
sample_every: 250 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 1024
|
||||
height: 1024
|
||||
# set to 1 for images
|
||||
|
||||
@@ -52,6 +52,7 @@ config:
|
||||
sample:
|
||||
sampler: "ddpm" # must match train.noise_scheduler
|
||||
sample_every: 100 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 512
|
||||
height: 512
|
||||
prompts:
|
||||
|
||||
@@ -52,6 +52,7 @@ config:
|
||||
sample:
|
||||
sampler: "ddpm" # must match train.noise_scheduler
|
||||
sample_every: 100 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 512
|
||||
height: 512
|
||||
prompts:
|
||||
|
||||
@@ -41,6 +41,7 @@ config:
|
||||
sample:
|
||||
sampler: "ddpm" # must match train.noise_scheduler
|
||||
sample_every: 100 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 512
|
||||
height: 512
|
||||
prompts:
|
||||
|
||||
@@ -52,6 +52,7 @@ config:
|
||||
sample:
|
||||
sampler: "ddpm" # must match train.noise_scheduler
|
||||
sample_every: 100 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 512
|
||||
height: 512
|
||||
prompts:
|
||||
|
||||
@@ -41,6 +41,7 @@ config:
|
||||
sample:
|
||||
sampler: "ddpm" # must match train.noise_scheduler
|
||||
sample_every: 100 # sample every this many steps
|
||||
sample_start_step: 0 # start sampling at this step
|
||||
width: 512
|
||||
height: 512
|
||||
prompts:
|
||||
|
||||
@@ -2371,7 +2371,11 @@ class BaseSDTrainProcess(BaseTrainProcess):
|
||||
# todo improve this logic to send one of each through if we can buckets and batch size might be an issue
|
||||
is_reg_step = False
|
||||
is_save_step = self.save_config.save_every and self.step_num % self.save_config.save_every == 0
|
||||
is_sample_step = self.sample_config.sample_every and self.step_num % self.sample_config.sample_every == 0
|
||||
is_sample_step = (
|
||||
self.sample_config.sample_every
|
||||
and self.step_num >= self.sample_config.sample_start_step
|
||||
and self.step_num % self.sample_config.sample_every == 0
|
||||
)
|
||||
if self.train_config.disable_sampling:
|
||||
is_sample_step = False
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ class SampleConfig:
|
||||
def __init__(self, **kwargs):
|
||||
self.sampler: str = kwargs.get('sampler', 'ddpm')
|
||||
self.sample_every: int = kwargs.get('sample_every', 100)
|
||||
self.sample_start_step: int = kwargs.get('sample_start_step', 0)
|
||||
self.width: int = kwargs.get('width', 512)
|
||||
self.height: int = kwargs.get('height', 512)
|
||||
self.neg = kwargs.get('neg', False)
|
||||
|
||||
@@ -1182,6 +1182,15 @@ export default function SimpleJob({
|
||||
min={1}
|
||||
required
|
||||
/>
|
||||
<NumberInput
|
||||
label="Sample Start Step"
|
||||
value={jobConfig.config.process[0].sample.sample_start_step ?? 0}
|
||||
onChange={value => setJobConfig(value, 'config.process[0].sample.sample_start_step')}
|
||||
placeholder="eg. 0"
|
||||
className="pt-2"
|
||||
min={0}
|
||||
required
|
||||
/>
|
||||
<SelectInput
|
||||
label="Sampler"
|
||||
className="pt-2"
|
||||
|
||||
@@ -3,6 +3,7 @@ import { SampleConfig } from "@/types";
|
||||
export const defaultSampleConfig: SampleConfig = {
|
||||
sampler: 'flowmatch',
|
||||
sample_every: 250,
|
||||
sample_start_step: 0,
|
||||
width: 1024,
|
||||
height: 1024,
|
||||
samples: [
|
||||
@@ -52,6 +53,7 @@ export const defaultSampleConfig: SampleConfig = {
|
||||
export const defaultAudioSampleConfig: SampleConfig = {
|
||||
sampler: 'flowmatch',
|
||||
sample_every: 250,
|
||||
sample_start_step: 0,
|
||||
width: 1024,
|
||||
height: 1024,
|
||||
samples: [
|
||||
@@ -406,6 +408,7 @@ It's Converging!
|
||||
export const defaultIdeogramSamplesConfig: SampleConfig = {
|
||||
sampler: 'flowmatch',
|
||||
sample_every: 250,
|
||||
sample_start_step: 0,
|
||||
width: 1024,
|
||||
height: 1024,
|
||||
samples: [
|
||||
@@ -973,4 +976,4 @@ export const defaultIdeogramSamplesConfig: SampleConfig = {
|
||||
sample_steps: 30,
|
||||
num_frames: 1,
|
||||
fps: 1,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,6 +201,7 @@ export interface SampleItem {
|
||||
export interface SampleConfig {
|
||||
sampler: string;
|
||||
sample_every: number;
|
||||
sample_start_step: number;
|
||||
width: number;
|
||||
height: number;
|
||||
prompts?: string[];
|
||||
|
||||
Reference in New Issue
Block a user