Use the generate config sampler instead of the undefined train_config in GenerateProcess
The sampler-building branch in GenerateProcess.__init__ referenced
`self.train_config.noise_scheduler`, but GenerateProcess never defines
`self.train_config` (only training processes do). Running a `generate`
job that hits this branch crashes at construction:
AttributeError: 'GenerateProcess' object has no attribute 'train_config'
Use the sampler from `self.generate_config`, which is already built
earlier in the same __init__. This branch currently always crashes, so
no working path is affected.
This commit is contained in:
parent
17bc302d13
commit
bade55a12d
|
|
@ -102,7 +102,7 @@ class GenerateProcess(BaseProcess):
|
|||
if self.model_config.is_lumina2:
|
||||
arch = 'lumina2'
|
||||
sampler = get_sampler(
|
||||
self.train_config.noise_scheduler,
|
||||
self.generate_config.sampler,
|
||||
{
|
||||
"prediction_type": "v_prediction" if self.model_config.is_v_pred else "epsilon",
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue