rbbrdckybk / dream-factory

Multi-threaded GUI manager for mass creation of AI-generated art with support for multiple GPUs.
MIT License
489 stars 57 forks source link

Lora not being applied correctly #47

Closed Koneko349 closed 1 year ago

Koneko349 commented 1 year ago

I want to be able to re-produce images in auto1111 that dream factory creates

I was trying to figure out why I wasnt able to reproduce images from dream factory in auto1111. It looks like loras are not being applied the same way. Without loras I am able to reproduce the same image, however with loras I cannot.

The prompt:

(takara miyuki, 1girl, glasses, pink hair, long hair, purple eyes), clean lines, (best quality), rich colors, saturated colors, ((Lucky Star anime)), 1girl, (looking at viewer, looking at camera, eye contact),(beautiful yukata), (anime aesthetic), standing in a forest at night, negative prompt: ((worst quality, low quality, photo, photorealistic, photo realistic)), (cropped head), (close up:1.6), (3d:1.6) size: 768x512 | model: AnythingV5_v5PrtRE.safetensors | sampler: DPM++ 2M Karras | steps: 30 | scale: 7.0 | seed: 410192554

Produces a very similar image in dream factory with or without the lora, however in auto1111 with the lora its a totally different image.

rbbrdckybk commented 1 year ago

See here.

There is an odd bug in Auto1111 where LoRAs aren't applied for some people when invoking via the API. If this affects you, the workaround is to add --api to your Auto1111 startup script.

Koneko349 commented 1 year ago

Thanks, I will give this a try and re-open if needed

Koneko349 commented 1 year ago

I followed the procedure, however dream factory seems to be resetting the webui-user.sh file each time I start it.

Koneko349 commented 1 year ago

Ah I see the error

Notice: found uncommented COMMANDLINE_ARGS in your webui-user.sh script. Dream Factory requires its own COMMANDLINE_ARGS to be set, and an uncommented line here will override the settings that Dream Factory needs to work. The following change has been made to /mnt/data/AI/stable-diffusion-webui/webui-user.sh :

old: export COMMANDLINE_ARGS="--api"

new: #export COMMANDLINE_ARGS="--api"

You'll need to uncomment this line if you wish to use Automatic1111 webui with the environment settings above. It will be re-commented automatically each time Dream Factory starts (and you'll receive this message again).

can you please advise how to set --api correctly?

rbbrdckybk commented 1 year ago

Ah, you're on Linux. Just pushed a tiny patch to Github that should fix the issue for you. Grab the latest by doing a git pull or run setup with the update flag and you should be all set.

No need to add --api to your startup script after grabbing the fix.

Koneko349 commented 1 year ago

Thanks! This seems to be working now, appreciate the quick fixes