-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
Outpainting for #405 #412
Outpainting for #405 #412
Conversation
…to diffusers-outpainting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far mostly works great, some issues though.
When the outpainted image gets large enough I'm receiving this error right after the final image gets placed in Blender. I'm assuming it has to do with it being done in a background thread and not Blender's main thread.
File "...\dream-textures\operators\dream_texture.py", line 147, in done_callback
image['dream_textures_hash'] = image_hash
AttributeError: Writing to ID classes in this context is not allowed: 388423733, Image datablock, error setting Image.dream_textures_hash
Also for some reason there is color shifting occurring in parts of the image that aren't even being outpainted to at the time.
To fix the threading issues, the |
I haven't had it happen yet with this implementation, but it seemed pretty random in the first place so hopefully this really did fix it. One drawback of this approach is it removes the ability to block via the Generator.shared().prompt_to_image(...).result() Instead you need the more verbose Generator.shared().prompt_to_image(..., _block=True).result() I don't think this is too bad considering it's internal API. |
Co-authored-by: NullSenseStudio <47096043+NullSenseStudio@users.noreply.github.com>
Perhaps the I suppose callbacks wouldn't run in this setup if |
…-textures into diffusers-outpainting
I think 9480c4b works the way you described, which does seem a bit better than the artificial delays that come with using timers as a thread.
|
Co-authored-by: NullSenseStudio <47096043+NullSenseStudio@users.noreply.github.com>
I've tracked this down to being caused by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was just about to mention those axis needing switched. Really getting tired of whoever standardized the y axis going before x.
Anyhow, everything seems to be working as intended now!
Me too, it's bizarre. They put the |
* Initial diffusers backend scaffolding * Support scheduler selection * Add more schedulers * Add ocio_transform action * Support seamless generation * Support cancellation * Remove old intents, upscaling, actor improvements * Add tiling to stable diffusion upscaler * Add image_to_image and inpaint * Update render_pass.py * fix activating when diffusers is not installed * load dependencies sooner * re-add other platform requirements * fix can_use() and cancel/stop operators * fix non-square images * Update optimization options * Add proper file naming * Fix data block removal error * Add upscale tile blending with the 'tiler' * Add 'tiler' to other requirements files * Add upscale naming * Add progress bar * Add progress bar to upscaling * Fix image2image * Fix inpaint * Raise the error in the exception_callback * Pipeline switching * fix upscale * no_grad already used in pipe * Outpainting support * Remove .save(...) * Re-use the same datablock * Add warning when there is no overlap * Consolidate labels * update workflow requirements * Use app timers instead of threading on the frontend * Update generator_process/actions/outpaint.py Co-authored-by: NullSenseStudio <47096043+NullSenseStudio@users.noreply.github.com> * Use app timers to run callbacks * Update preferences.py Co-authored-by: NullSenseStudio <47096043+NullSenseStudio@users.noreply.github.com> * Use NDArray for all init_image types * Swap w/h Co-authored-by: NullSenseStudio <47096043+NullSenseStudio@users.noreply.github.com>
I changed the way outpainting works for better performance and flexibility. Instead of specifying the expansion on each axis, it uses the specified image size and an origin point.
For example, to extend a 512x512 image to the right:
(512, 512)
)(448, 0)
for a 64px overlap, `(384, 0) for a 128px overlap, etc.It will only run SD on a 512x512 area, and then overlays it on an extended image at the end.