dreambooth train error #1263
traveller6168
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
LR: 2e-06
V2: False
Steps: 0%| | 0/12200 [00:00<?, ?it/s][2023-06-04 16:51:32,596] torch._dynamo.convert_frame: [ERROR] WON'T CONVERT get_rng_state /root/miniconda3/lib/python3.8/site-packages/torch/random.py line 21
23 0 LOAD_GLOBAL 0 (default_generator)
2 LOAD_METHOD 1 (get_state)
4 CALL_METHOD 0
6 RETURN_VALUE
========== TorchDynamo Stack Trace ==========
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/convert_frame.py", line 324, in _compile
out_code = transform_code_object(code, transform)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/bytecode_transformation.py", line 445, in transform_code_object
transformations(instructions, code_options)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/convert_frame.py", line 311, in transform
tracer.run()
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 1726, in run
super().run()
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 576, in run
and self.step()
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 540, in step
getattr(self, inst.opname)(inst)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 342, in wrapper
return inner_fn(self, inst)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 965, in CALL_FUNCTION
self.call_function(fn, args, {})
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/symbolic_convert.py", line 474, in call_function
self.push(fn.call_function(self, args, kwargs))
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/variables/torch.py", line 368, in call_function
return wrap_fx_proxy(
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/variables/builder.py", line 754, in wrap_fx_proxy
return wrap_fx_proxy_cls(
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/variables/builder.py", line 812, in wrap_fx_proxy_cls
assert "source" in options and options["source"] is not None
AssertionError:
========== The above exception occurred while processing the following code ==========
File "/root/miniconda3/lib/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File "/root/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/root/miniconda3/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/utils/utils.py", line 190, in f
res = func(*args, **kwargs)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/ui_functions.py", line 727, in start_training
result = main(class_gen_method=class_gen_method)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 1375, in main
return inner_loop()
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/memory.py", line 119, in decorator
return function(batch_size, grad_size, prof, *args, **kwargs)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 1173, in inner_loop
noise_pred = unet(
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/accelerate/utils/operations.py", line 495, in call
return convert_to_fp32(self.model_forward(*args, **kwargs))
File "/root/miniconda3/lib/python3.8/site-packages/torch/amp/autocast_mode.py", line 14, in decorate_autocast
return func(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/diffusers/models/unet_2d_condition.py", line 582, in forward
sample, res_samples = downsample_block(
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/diffusers/models/unet_2d_blocks.py", line 828, in forward
hidden_states = torch.utils.checkpoint.checkpoint(create_custom_forward(resnet), hidden_states, temb)
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/checkpoint.py", line 250, in checkpoint
return CheckpointFunction.apply(function, preserve, *args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/checkpoint.py", line 82, in forward
ctx.fwd_cpu_state = torch.get_rng_state()
File "/root/miniconda3/lib/python3.8/site-packages/torch/random.py", line 21, in get_rng_state
def get_rng_state() -> torch.Tensor:
File "/root/miniconda3/lib/python3.8/site-packages/torch/random.py", line 23, in get_rng_state
return default_generator.get_state()
==========
[2023-06-04 16:52:05,617] torch._dynamo.convert_frame: [ERROR] WON'T CONVERT init /root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/container.py line 276
277 0 LOAD_GLOBAL 0 (super)
2 CALL_FUNCTION 0
4 LOAD_METHOD 1 (init)
6 CALL_METHOD 0
8 POP_TOP
278 10 LOAD_FAST 1 (modules)
12 LOAD_CONST 0 (None)
14 COMPARE_OP 9 (is not)
16 POP_JUMP_IF_FALSE 26
279 18 LOAD_FAST 0 (self)
20 LOAD_FAST 1 (modules)
22 INPLACE_ADD
24 STORE_FAST 0 (self)
========== TorchDynamo Stack Trace ==========
Traceback (most recent call last):
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/convert_frame.py", line 364, in _compile
check_fn = CheckFunctionManager(
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/guards.py", line 547, in init
guard.create(local_builder, global_builder)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_guards.py", line 163, in create
return self.create_fn(self.source.select(local_builder, global_builder), self)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/guards.py", line 299, in NN_MODULE
unimplemented(f"Guard setup for uninitialized class {type(val)}")
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/exc.py", line 71, in unimplemented
raise Unsupported(msg)
torch._dynamo.exc.Unsupported: Guard setup for uninitialized class <class 'torch.nn.modules.container.ModuleList'>
========== The above exception occurred while processing the following code ==========
File "/root/miniconda3/lib/python3.8/threading.py", line 890, in _bootstrap
self._bootstrap_inner()
File "/root/miniconda3/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/root/miniconda3/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/utils/utils.py", line 190, in f
res = func(*args, **kwargs)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/ui_functions.py", line 727, in start_training
result = main(class_gen_method=class_gen_method)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 1375, in main
return inner_loop()
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/memory.py", line 119, in decorator
return function(batch_size, grad_size, prof, *args, **kwargs)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 1173, in inner_loop
noise_pred = unet(
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/accelerate/utils/operations.py", line 495, in call
return convert_to_fp32(self.model_forward(*args, **kwargs))
File "/root/miniconda3/lib/python3.8/site-packages/torch/amp/autocast_mode.py", line 14, in decorate_autocast
return func(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/diffusers/models/unet_2d_condition.py", line 607, in forward
sample = self.mid_block(
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/diffusers/models/unet_2d_blocks.py", line 539, in forward
for attn, resnet in zip(self.attentions, self.resnets[1:]):
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/container.py", line 293, in getitem
return self.class(list(self._modules.values())[idx])
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/container.py", line 276, in init
def init(self, modules: Optional[Iterable[Module]] = None) -> None:
Steps: 5%| | 610/12200 [04:59<47:54, 4.03it/s, inst_loss=0, loss=0.0111, lr=2
Saving weights: 0%| | 0/4 [00:00<?, ?it/s]
Saving weights: 0%| | 0/4 [00:00<?, ?it/s]
Generating Samples: 0%| | 0/4 [00:03<?, ?it/s]
Generating Samples: 0%| | 0/3 [00:00<?, ?it/s]
Generating Samples: 33%|████████▎ | 1/3 [00:02<00:04, 2.16s/it]Model name: motorbike
Saving /root/autodl-tmp/stable-diffusion-webui/models/dreambooth/motorbike/logging/loss_plot_0.png
Saving /root/autodl-tmp/stable-diffusion-webui/models/dreambooth/motorbike/logging/ram_plot_0.png
Cleanup log parse.
Generating Samples: 100%|█████████████████████████| 3/3 [00:05<00:00, 1.85s/it]
Traceback (most recent call last):
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/ui_functions.py", line 727, in start_training
result = main(class_gen_method=class_gen_method)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 1375, in main
return inner_loop()
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/memory.py", line 119, in decorator
return function(batch_size, grad_size, prof, *args, **kwargs)
File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/train_dreambooth.py", line 1173, in inner_loop
noise_pred = unet(
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/accelerate/utils/operations.py", line 495, in call
return convert_to_fp32(self.model_forward(*args, **kwargs))
File "/root/miniconda3/lib/python3.8/site-packages/torch/amp/autocast_mode.py", line 14, in decorate_autocast
return func(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/eval_frame.py", line 82, in forward
return self.dynamo_ctx(self._orig_mod.forward)(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/eval_frame.py", line 209, in _fn
return fn(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/diffusers/models/unet_2d_condition.py", line 563, in forward
emb = self.time_embedding(t_emb, timestep_cond)
File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/diffusers/models/embeddings.py", line 200, in forward
def forward(self, sample, condition=None):
File "/root/miniconda3/lib/python3.8/site-packages/torch/_dynamo/eval_frame.py", line 209, in _fn
return fn(*args, **kwargs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_functorch/aot_autograd.py", line 2836, in forward
return compiled_fn(full_args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_functorch/aot_autograd.py", line 1224, in g
return f(*args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_functorch/aot_autograd.py", line 2403, in debug_compiled_function
return compiled_function(*args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_functorch/aot_autograd.py", line 1900, in runtime_wrapper
all_outs = call_func_with_args(
File "/root/miniconda3/lib/python3.8/site-packages/torch/_functorch/aot_autograd.py", line 1249, in call_func_with_args
out = normalize_as_list(f(args))
File "/root/miniconda3/lib/python3.8/site-packages/torch/_functorch/aot_autograd.py", line 1224, in g
return f(*args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/autograd/function.py", line 506, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
File "/root/miniconda3/lib/python3.8/site-packages/torch/_functorch/aot_autograd.py", line 2168, in forward
fw_outs = call_func_with_args(
File "/root/miniconda3/lib/python3.8/site-packages/torch/_functorch/aot_autograd.py", line 1249, in call_func_with_args
out = normalize_as_list(f(args))
File "/root/miniconda3/lib/python3.8/site-packages/torch/_inductor/compile_fx.py", line 248, in run
return model(new_inputs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_inductor/compile_fx.py", line 267, in run
return compiled_fn(new_inputs)
File "/root/miniconda3/lib/python3.8/site-packages/torch/_inductor/compile_fx.py", line 340, in run
assert dst.data_ptr() == src.data_ptr()
AssertionError
Beta Was this translation helpful? Give feedback.
All reactions