Salvador - AI Image Generation in Flame

This works very well. Thanks for making this!

Awesome stuff!!!
Any way to use the inpaint module for sources inside batch?
I may be too dumb to see the obvious…

TBH, I couldn’t get the hang of how the infill is supposed to work either. What’s the trick?

Glad to hear the script is working now.

To use the infill, take an image and create a matte for the area you want to infill paint. Add the matte to the image in Flame then right-click on that image and run the script. The options to do infill paint should then be usable.

1 Like

I was trying to install the script but i got this error.

Does anyone have idea about it?

Are you getting any errors in the shell?

Also, if you’re interested I’ve made a newer version of the script that uses Stable Diffusion instead of Dalle. It’s up on the Logik Portal. It’s all local so no need to pay someone to do renders and I’ve added the ability to paint mattes instead of having to import them to do inpainting and it can also do upscaling.

Mike


10 Likes

Thank you mike. It fixed when I run the flame with terminal…

Its great to have the script that uses Stable Diffusion in Flame… I installed it now but i can’t saw any button when I right click in batch.

Are you getting any errors in the terminal from the script?

I think it requires newer version of flame… min. 2023.2 but I am using 2023 rn…

Python encountered ModuleNotFoundError(“No module named ‘pyflame_lib_add_gmask’”) in unknown code
[PYTHON HOOK] An error occurred. Ignoring python hooks from /opt/Autodesk/shared/python/add_gmask/pyflame_lib_add_gmask.py
Python encountered ModuleNotFoundError(“No module named ‘pyflame_lib_add_gmask’”) in unknown code
[PYTHON HOOK] An error occurred. Ignoring python hooks from /opt/Autodesk/shared/python/add_gmask/add_gmask.py
→ Getting python script description

→ stable diffusion requires newer version of flame <<<

→ Connected to Logik Portal.

Script name: stable_diffusion
Script Flame version: 2023.2

→ Downloading python script…

tar: Failed to set default locale
→ Script installed.

→ Disconnected from Logik Portal.

Python encountered ModuleNotFoundError(“No module named ‘pyflame_lib_add_gmask’”) in unknown code
[PYTHON HOOK] An error occurred. Ignoring python hooks from /opt/Autodesk/shared/python/add_gmask/pyflame_lib_add_gmask.py
Python encountered ModuleNotFoundError(“No module named ‘pyflame_lib_add_gmask’”) in unknown code
[PYTHON HOOK] An error occurred. Ignoring python hooks from /opt/Autodesk/shared/python/add_gmask/add_gmask.py
→ Python hooks refreshed.

→ Logik Portal: Download Complete: Python script installed: stable diffusion

Saving config…

Config path: /opt/Autodesk/shared/python/logik_portal/config
Config xml path: /opt/Autodesk/shared/python/logik_portal/config/config.xml

Config Values:

    updated: last_tab: 0

→ Config saved.

Yea, for the stable diffusion script you’ll need at least 2023.2. Although it looks like the add gmask script isn’t working either. You might want to try to reinstall that one. I’ve been doing some testing with the portal over the past few days that might have caused a problem with that script.

Hi Mike. I’m trying to install this script and in my case flame return this error when I go into batch I click on the stable diffusion button.

I just made a quick change to the installer in the script and put it on the Portal. Give it a shot. Once it starts installing, it might take a while depending on your internet connection. It has to download the base stable diffusion model and some needed python packages. A separate terminal window should open where you can see this happening. Once everything is done downloading it should open. Hopefully :slight_smile:

2 Likes

Hi Mike. I was trying to install it again and this time returned this error on terminal and didn’t complete the installation. Thanks for your attention.

Does it work if you restart flame and try to run it again?

Yes. I restarted Flame and tried, but now it’s showing this.:

Same issue here @MikeV.

Thanks for letting me know guys. After looking into it a little more it seems like there are a couple of things I need to fix around to get it working on linux.

1 Like

Installed on mac, all seemed ok, but when I try to use it, it hangs on:
STABLE DIFFUSION:Waiting for stable to diffusion to initialise
And in a terminal I get:
ERROR: python3-venv is not installed, aborting…

Updated python and now get this in the terminal:
(Flame still hangs with waiting for stable diffusion to initialise)
Python 3.10.6 (v3.10.6:9c7b4bd164, Aug 1 2022, 17:13:48) [Clang 13.0.0 (clang-1300.0.29.30)]
Version: v1.3.2
Commit hash: baf6946e06249c5af9851c60171692c44ef633e0
Installing requirements
Launching Web UI with arguments: --skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate --api
No module ‘xformers’. Proceeding without it.
Warning: caught exception ‘Torch not compiled with CUDA enabled’, memory monitor disabled
Traceback (most recent call last):
File “/opt/Logik_Portal/Stable_Diffusion/stable-diffusion/launch.py”, line 38, in
main()
File “/opt/Logik_Portal/Stable_Diffusion/stable-diffusion/launch.py”, line 34, in main
start()
File “/opt/Logik_Portal/Stable_Diffusion/stable-diffusion/modules/launch_utils.py”, line 330, in start
import webui
File “/opt/Logik_Portal/Stable_Diffusion/stable-diffusion/webui.py”, line 49, in
from modules import shared, sd_samplers, upscaler, extensions, localization, ui_tempdir, ui_extra_networks, config_states
File “/opt/Logik_Portal/Stable_Diffusion/stable-diffusion/modules/sd_samplers.py”, line 1, in
from modules import sd_samplers_compvis, sd_samplers_kdiffusion, shared
File “/opt/Logik_Portal/Stable_Diffusion/stable-diffusion/modules/sd_samplers_compvis.py”, line 9, in
from modules import sd_samplers_common, prompt_parser, shared
File “/opt/Logik_Portal/Stable_Diffusion/stable-diffusion/modules/sd_samplers_common.py”, line 5, in
from modules import devices, processing, images, sd_vae_approx, sd_samplers, sd_vae_taesd
File “/opt/Logik_Portal/Stable_Diffusion/stable-diffusion/modules/processing.py”, line 11, in
import cv2
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cv2/init.py”, line 181, in
bootstrap()
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cv2/init.py”, line 153, in bootstrap
native_module = importlib.import_module(“cv2”)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cv2/cv2.abi3.so, 2): Symbol not found: _VTRegisterSupplementalVideoDecoderIfAvailable
Referenced from: /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib (which was built for Mac OS X 11.0)
Expected in: /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox
in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/cv2/.dylibs/libavcodec.59.37.100.dylib

… waiting for update. many thanks.

2 Likes

like this …