<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIL. - AI-Local Systems (GPT4All) > AIL. - AI-Local Systems (GPT4All) |
MiniRobotLanguage (MRL)
Combining GPT4All and Stable Diffusion (Local)
You can combine AI's to get amazing results.
This picture was generated using the Combination of GPT4All and Stable Diffusion (local)
The following Code will use GPT4All to optimize the Prompt before its delivered to Stable Diffusion.
VAR.$$THE="neural network beautiful golden girl Galaxy robot digital photorealistic NC-1701 enterprise"
VAR.$$PAO=Please make me a prompt below 231 characters, for stable diffusion using the following Theme: $$THE. Please only the result and no further comments.
VAR.$$PAO+Do not write "Prompt:", just write the result.
' Use Image Register 0
VIN.$$IMR=0
' Set OpenAI API-Key from the saved File
AIC.SetKey|File
' Set Model-Temperature
AIC.Set_Temperature|0
' Set Max-Tokens (Possible lenght of answer, depending on the Model up to 2000 Tokens which is about ~6000 characters)
' The more Tokens you use the more you need to pay. But the longer Input and Output can be.
AIC.SetMax_Token|800
' We choose Wizzard v1.1
AIL.Set Model|7
FOR.$$STP|1|25
AIL.Ask|$$PAO|$$RET
DBP. Got: <<$$RET >>
$$FIR=?path\Sample Pics\MTResult_?.png
FIL.gen|$$FIR|1|0|$$FIL
SDL.gtf|$$RET|$$FIL
ANA.Load|$$IMR|$$FIL
$$TXT=SPR/SDO. generated: $$STP Steps
$$COA=&HFFFFFF
$$COB==&H0
$$BGC=-2
$$XPA=30
$$YPA=450
ANA.PrintAt|$$IMR|$$TXT|$$COA|$$BGC|$$XPA|$$YPA|24
ANA.PrintAt|$$IMR|$$TXT|$$COB|$$BGC|($$XPA+1)|($$YPA+2)|24
DBP.Loaded in IR:$$IMR -> $$FIL
ANA.save|$$IMR|$$FIL
ANA.Show|$$IMR
NEX.
ENR.
Remarks
-
Limitations:
-
See also:
•