Add sample_start_step setting to configure when sampling starts (#949)
Co-authored-by: Jaret Burkett <jaretburkett@gmail.com>
This commit is contained in:
1 parent
4ece17b71f
commit
8bbd051667
31 files changed
+45
-1
No files matched your search
@@ -70,6 +70,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
# I leave half blank to test prompt and unprompted
|
# I leave half blank to test prompt and unprompted
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
# you can provide up to 3 control images here
|
# you can provide up to 3 control images here
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
samples:
|
samples:
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch" # must match train.noise_scheduler
|
sampler: "flowmatch" # must match train.noise_scheduler
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch"
|
sampler: "flowmatch"
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 832
|
width: 832
|
||||||
height: 480
|
height: 480
|
||||||
num_frames: 40
|
num_frames: 40
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch"
|
sampler: "flowmatch"
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 832
|
width: 832
|
||||||
height: 480
|
height: 480
|
||||||
num_frames: 40
|
num_frames: 40
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "flowmatch"
|
sampler: "flowmatch"
|
||||||
sample_every: 250 # sample every this many steps
|
sample_every: 250 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 1024
|
width: 1024
|
||||||
height: 1024
|
height: 1024
|
||||||
# set to 1 for images
|
# set to 1 for images
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "ddpm" # must match train.noise_scheduler
|
sampler: "ddpm" # must match train.noise_scheduler
|
||||||
sample_every: 100 # sample every this many steps
|
sample_every: 100 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 512
|
width: 512
|
||||||
height: 512
|
height: 512
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "ddpm" # must match train.noise_scheduler
|
sampler: "ddpm" # must match train.noise_scheduler
|
||||||
sample_every: 100 # sample every this many steps
|
sample_every: 100 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 512
|
width: 512
|
||||||
height: 512
|
height: 512
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "ddpm" # must match train.noise_scheduler
|
sampler: "ddpm" # must match train.noise_scheduler
|
||||||
sample_every: 100 # sample every this many steps
|
sample_every: 100 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 512
|
width: 512
|
||||||
height: 512
|
height: 512
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "ddpm" # must match train.noise_scheduler
|
sampler: "ddpm" # must match train.noise_scheduler
|
||||||
sample_every: 100 # sample every this many steps
|
sample_every: 100 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 512
|
width: 512
|
||||||
height: 512
|
height: 512
|
||||||
prompts:
|
prompts:
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ config:
|
|||||||
sample:
|
sample:
|
||||||
sampler: "ddpm" # must match train.noise_scheduler
|
sampler: "ddpm" # must match train.noise_scheduler
|
||||||
sample_every: 100 # sample every this many steps
|
sample_every: 100 # sample every this many steps
|
||||||
|
sample_start_step: 0 # start sampling at this step
|
||||||
width: 512
|
width: 512
|
||||||
height: 512
|
height: 512
|
||||||
prompts:
|
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
|
# 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_reg_step = False
|
||||||
is_save_step = self.save_config.save_every and self.step_num % self.save_config.save_every == 0
|
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:
|
if self.train_config.disable_sampling:
|
||||||
is_sample_step = False
|
is_sample_step = False
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ class SampleConfig:
|
|||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.sampler: str = kwargs.get('sampler', 'ddpm')
|
self.sampler: str = kwargs.get('sampler', 'ddpm')
|
||||||
self.sample_every: int = kwargs.get('sample_every', 100)
|
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.width: int = kwargs.get('width', 512)
|
||||||
self.height: int = kwargs.get('height', 512)
|
self.height: int = kwargs.get('height', 512)
|
||||||
self.neg = kwargs.get('neg', False)
|
self.neg = kwargs.get('neg', False)
|
||||||
|
|||||||
@@ -1182,6 +1182,15 @@ export default function SimpleJob({
|
|||||||
min={1}
|
min={1}
|
||||||
required
|
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
|
<SelectInput
|
||||||
label="Sampler"
|
label="Sampler"
|
||||||
className="pt-2"
|
className="pt-2"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { SampleConfig } from "@/types";
|
|||||||
export const defaultSampleConfig: SampleConfig = {
|
export const defaultSampleConfig: SampleConfig = {
|
||||||
sampler: 'flowmatch',
|
sampler: 'flowmatch',
|
||||||
sample_every: 250,
|
sample_every: 250,
|
||||||
|
sample_start_step: 0,
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 1024,
|
height: 1024,
|
||||||
samples: [
|
samples: [
|
||||||
@@ -52,6 +53,7 @@ export const defaultSampleConfig: SampleConfig = {
|
|||||||
export const defaultAudioSampleConfig: SampleConfig = {
|
export const defaultAudioSampleConfig: SampleConfig = {
|
||||||
sampler: 'flowmatch',
|
sampler: 'flowmatch',
|
||||||
sample_every: 250,
|
sample_every: 250,
|
||||||
|
sample_start_step: 0,
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 1024,
|
height: 1024,
|
||||||
samples: [
|
samples: [
|
||||||
@@ -406,6 +408,7 @@ It's Converging!
|
|||||||
export const defaultIdeogramSamplesConfig: SampleConfig = {
|
export const defaultIdeogramSamplesConfig: SampleConfig = {
|
||||||
sampler: 'flowmatch',
|
sampler: 'flowmatch',
|
||||||
sample_every: 250,
|
sample_every: 250,
|
||||||
|
sample_start_step: 0,
|
||||||
width: 1024,
|
width: 1024,
|
||||||
height: 1024,
|
height: 1024,
|
||||||
samples: [
|
samples: [
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ export interface SampleItem {
|
|||||||
export interface SampleConfig {
|
export interface SampleConfig {
|
||||||
sampler: string;
|
sampler: string;
|
||||||
sample_every: number;
|
sample_every: number;
|
||||||
|
sample_start_step: number;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
prompts?: string[];
|
prompts?: string[];
|
||||||
|
|||||||
Reference in new issue
Block a user