Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

35D Train Lora Error when sample。 #1726

Closed
jinwei1660 opened this issue Oct 26, 2024 · 2 comments
Closed

35D Train Lora Error when sample。 #1726

jinwei1660 opened this issue Oct 26, 2024 · 2 comments

Comments

@jinwei1660
Copy link

Using cached text encoder outputs for prompt: MY021 a woman standing in front of a white background wearing a beige puffer jacket and green pants. The jacket has a high neckline and long sleeves, and the pants have a slim fit. The woman has her hands in her pockets and a confident stance.
Encoding prompt: MY021 a woman standing in front of a white background wearing a beige puffer jacket and green pants. The jacket has a high neckline and long sleeves, and the pants have a slim fit. The woman has her hands in her pockets and a confident stance.
Using cached text encoder outputs for prompt:
Encoding prompt:
Traceback (most recent call last):
File "D:\pinokio\api\ajfluxlora\sd-scripts-3.5\sd3_train_network.py", line 426, in
trainer.train(args)
File "D:\pinokio\api\ajfluxlora\sd-scripts-3.5\train_network.py", line 1234, in train
self.sample_images(
File "D:\pinokio\api\ajfluxlora\sd-scripts-3.5\sd3_train_network.py", line 256, in sample_images
sd3_train_utils.sample_images(
File "D:\pinokio\api\ajfluxlora\sd-scripts-3.5\library\sd3_train_utils.py", line 426, in sample_images
sample_image_inference(
File "D:\pinokio\api\ajfluxlora\sd-scripts-3.5\library\sd3_train_utils.py", line 558, in sample_image_inference
latents = do_sample(height, width, seed, cond, neg_cond, mmdit, sample_steps, scale, vae.dtype, accelerator.device)
File "D:\pinokio\api\ajfluxlora\sd-scripts-3.5\library\sd3_train_utils.py", line 320, in do_sample
torch.randn(latent.size(), dtype=torch.float32, layout=latent.layout, generator=generator, device="cpu")
UnboundLocalError: local variable 'generator' referenced before assignment
steps: 20%|██████████▍ | 1380/6900 [29:13<1:56:52, 1.27s/it, avr_loss=0.0568]
Traceback (most recent call last):
File "d:\pinokio\bin\miniconda\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "d:\pinokio\bin\miniconda\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "D:\pinokio\api\ajfluxlora\env\Scripts\accelerate.exe_main
.py", line 7, in
File "d:\pinokio\api\ajfluxlora\env\lib\site-packages\accelerate\commands\accelerate_cli.py", line 48, in main
args.func(args)
File "d:\pinokio\api\ajfluxlora\env\lib\site-packages\accelerate\commands\launch.py", line 1106, in launch_command
simple_launcher(args)
File "d:\pinokio\api\ajfluxlora\env\lib\site-packages\accelerate\commands\launch.py", line 704, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)

@kohya-ss
Copy link
Owner

This error occurred if no seed was specified when generating sample images. Fixed.

@jinwei1660
Copy link
Author

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants