moonride303 / fooocus-mre Goto Github PK
View Code? Open in Web Editor NEWThis project forked from lllyasviel/fooocus
Focus on prompting and generating
License: GNU General Public License v3.0
This project forked from lllyasviel/fooocus
Focus on prompting and generating
License: GNU General Public License v3.0
Instead of having multiple copies of checkpoints, lora,s embeddings TI, I keep them in once central place on my fastest SSD drive (This will make Fooocus faster) then I instruct A1111 and Comfyui to look there.
Request for custom path for checkpoints, Loras, and outputs in settings.json
I believe the file to edit is Fooocus-MoonRide/modules/path.py
Priority is not urgent, I could just hard code in path.py. Only want to know if MoonRide is interested or has the time?
docker pull cgwyx/fooocusmre:cuda116-xformers
docker run -it --name fooocusmre-xformers --gpus /"device=1/" --network host /
-v /mnt/p1/diffusion/Fooocus-MREdocker:/Fooocus-MRE /
-v /mnt/p1/diffusion/models/Stable-diffusion:/Fooocus-MRE/models/checkpoints /
-v /mnt/p1/diffusion/models/loras:/Fooocus-MRE/models/loras /
-v /mnt/p1/diffusion/outputs:/Fooocus-MRE/outputs /
cgwyx/fooocusmre:cuda116-xformers bash
conda activate fooocus && python launch.py
It would be great if we could save our own custom styles, the positive and negative prompts.
Maybe have it in its own dropdown.
I have my own custom styles that I edit into the sdxl_styles.py file. But everytime I start Fooocus it updates everything and I lose my custom styles. Is there a way to keep my styles, and/or stop Fooocus from updating every start.
Given that we now have a log file, wouldn't it be nice to populate the UI directly from that file?
The UI is a little bit confusing.
For example do I need to tick image 2 image check box at the input tab when use canny for img2img?
Or just tick Control-Lora-Canny on the CN tab on the right side?
Or booth?
Made a pinokio app. May not correctly install requirements, please test.
@MoonRide303 I know you closed the toggle issue, but not a big deal.
I'm trying to work with F-MRE, but that long dropdown of resolutions is way too long. I showed this to a GUI/UX person who felt the same way, in what is otherwise a very very usable and clean interface.
A 'nice to have' : A custom resolution box be implemented for X / Y (Width, Height) resolution, and this will allow people to simply type in their required resolution and start working rather than scroll through the list each time they want a different res.
I think it will be easier for everyone if settings-example.json
became settings.json
and people edit in it directly to change the defaults without renaming it and go through the documentations.
Hi, first of all I have to say that your work is excellent.Is it possible to upload a photo (or send a link) and edit based on the uploaded photo, if there is such a feature, please guide me to use it.
There are a bunch of resolutions / image sizes , but as we can see now, the dropdown is TOO long.
I propose having either a toggle button for landscape/ portrait mode or an aspect ratio button to quickly switch without getting bogged down in the long dropdown.
Addendum.
I don't see any 16:9 / 9:16 ratios or 16:10, which are pretty common and widely used. For example
I feel those are necessary additions and should have been part of the original project too.
I've calculated some resolutions that might be useful
1152 x 720 - 16:10
1152 x 648 - 16:9
1280x720 - 16:9
Edit 2:
(Note from the GUI perspective - the dropdown is indeed way too long now, and serves as a distraction rather than a 'quick' generation.
For other members contributing to the project, it might be helpful to discuss / see if it might be more feasible to say enter a width or height value, and use the toggle to fill in the other resolution based on aspect, or just enter values in both fields (faster).
The software works fine with 1 gpu, but it completely ignores other. It would be nice if it could automaticly generate few images at the same time depending on the amount of gpus computer has. Also it's now hard to understand how to use ImgToImg mode properly for a new user, so I think it's worth adding some information about how to use that program in ReadMe or somewhere else. Thanks for your work!
Thank you Moonride303 for this fantastic upgrade of Fooocus. It is gold. The only thing which is still missing in Fooocus is an integration of an upscaler like Esrgan and a face restoration like Codeformer/Gfpgan. Thank you for your work!
Can we have or already have a keyboard shortcut to start generating?
same as we have in A1111 (ctrl+enter)
have set custom paths in the paths.py but it doesnt recognise subfolders for checkpoints or loras
In ComfyUI, the sampler settings include an option to select the scheduler, giving users an added layer of control over image generation. It might be worthwhile to incorporate this feature into this repository as well.
Feature Request: Control-LoRA and Revision
I use FocusMRE and it is great.
I use it locally (much faster then Automatic1111 on my RTX 2080 8GB) and also on linux server with gradio and --share.
May be I am stupid but I found no way to see log.html when using gradio.
Lifehuck: I see that Automatic1111 can open links like:
https://47c763360a19fc9500.gradio.live/file=/data/ptits/a1111/stable-diffusion-webui/outputs/txt2img-images/2023-09-07/
So, I set output path for FocusMRE то stable-diffusion-webui/outputs/txt2img-images/ and then I can open
https://47c763360a19fc9500.gradio.live/file=/data/ptits/a1111/stable-diffusion-webui/outputs/txt2img-images/2023-09-07/log.html with no problem
But I need to have Automatic working on sever.
I found no directory than gradio of FocusMRE can access, is there one? (like in Automatic). (searching for gr.Interface had now results)
Can you make default "outputs" directory be accessible from gradio?
Something like:
https://47c763360a19fc9500.gradio.live/file=/data/ptits/FocusMRE/outputs/2023-09-07/log.html
I'm sure this is NOT the best approach but this worked for me on Windows.
Assuming you already have the original Fooocus 7z file downloaded, installed and working.
Close Fooocus if its running.
cd into the parent folder that contains Foooccus / python-embeded / run.bat
git clone https://github.com/MoonRide303/Fooocus.git Fooocus-MoonRide
duplicate run.bat to run-moonride.bat
Copy (or move) your models folder from Fooocus/models
to Fooocus-MoonRide/models
edit run-moonride.bat and change Fooocus to Fooocus-MoonRide
double click the run-moonride.bat
start_time = time.time()
imgs = pipeline.process(p_txt, n_txt, steps, switch, width, height, seed, sampler_name, scheduler,
cfg, base_clip_skip, refiner_clip_skip, input_image_path, start_step, denoise, callback=callback)
end_time = time.time()
elapsed_time = end_time - start_time
print(f"\033[91mTime taken: {elapsed_time} seconds\033[0m")
It would be useful to have a tickbox that exposes the CFG and sampler options on the front page. It great having this all hidden away but sometimes you want to experiment.
Hi @MoonRide303 ,
There are more than 20 styles in the advanced panel, when choosing any of them, it's really hard to choose.
And if there are preview photo like this, that might be more easy to use:
I know that would not be simple any more..
But it's really hard for non-english user T T...
By the way, how shall I do to add translation package to this project, would you like to add the i-18 folder?
I post this request at lllyasviel/Fooocus but I will post this here too. Pretty sure lllyasviel have higher-piority things to do
In A1111 you can right-click the generate button and select "generate forever" then right-click again when you want to stop.
This way you can have Fooocus working all night while you sleep or all day while you are at work.
This addition doesn't affect the simple and elegant interface.
Hello
I'm running Fooocus-MRE on a Cloud Instance and if it's accessed by the ip-address:port it works fine. But if I access it using a proxy sever (fooocus.example.com) it opens, but I see the error in the screenshot.
I'm starting the service with python launch.py --listen 0.0.0.0 --port 7866 but I have tried use the server public address, dns name, etc and get the same error.
Any tips?
Ipadapter is a better and more robust Revision with more control. It can work as a real-time 1 image LoRa. People are doing revision + ipadapter and other combinations using Comfy. It would be really nice to have this in MRE.
ComfyUI Custom Node: https://github.com/laksjdjf/IPAdapter-ComfyUI
Link to the model: https://huggingface.co/h94/IP-Adapter/tree/main/sdxl_models
About IPAdapter: https://github.com/tencent-ailab/IP-Adapter
===
Upscale
SAG on Fooocus helps a lot, but MRE would need an effective upscale strategy to be even better. Some ideas:
The attempt by city96: https://github.com/city96/SD-Latent-Upscaler
By WAS/Ttl: https://github.com/Ttl/ComfyUi_NNLatentUpscale
These are some suggestions to create an upscaler for MRE; it would make this project even better.
Thank you, MoonRide, for this excellent project. You made Foocus much better, and thank you for the Colab edition. It's good for us folks that don't have a proper computer to run SDXL, and I'm using it every day.
Could you add the ability to save as JPG? (With EXIF info that contains metadata)
A1111 has this functionality.
I'm trying out MRE today, and it is great as a simple image generator.
I can't also find the DPM++ 2M scheduler in the dropdown.
Whenever I switch models and press Generate I get
missing {'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.logit_scale'}
Generate again it goes away. Only happens after you switch model
Also get it when 1st launch Fooocus
[Fooocus-MRE] is real top.
I switched from A1111 completely.
Last update of A1111 works with refiner in a very bad way, switching between model takes more time than rendering itself.
What I missed from A1111 is PlotXYZ.
For tweaking and experimenting it is a killer feature.
Now I need to tweak the code to run loops for denoising or other parameters and then selecting best ones
Is there any hope to see some kind of looping through parameters (no legend needed, log is fine)?
One day I made loop with style and got some funny results:
#from modules.sdxl_styles import style_keys
#for key in style_keys:
#style = key
#pipeline.clean_prompt_cond_caches()
I described it here - lllyasviel#249
Some more fun here:
https://cgevent.ru/imgs/collage/DynaVision/1table.html
https://cgevent.ru/imgs/collage/PhysGen/1table.html
All done with Fooocus-MRE.
So PlotXYZ can be real killer in Fooocus.
Maybe, lllyasviel#325
Thank you for your effort. Amazing and easy to use AI creation tool. It would be great if it has Photoshop and Krita plugins.
But this tool (FooocusMRE) does not need to be complicated in the future.
When staring in linux there are errors:
[error] WSL Interoperability is disabled. Please enable it before using WSL.
/usr/bin/www-browser: line 216: /mnt/c/Windows/System32/reg.exe: No such file or directory
/usr/bin/www-browser: line 149: /mnt/c/Windows/System32/chcp.com: No such file or directory
/usr/bin/www-browser: line 156: /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe: No such file or directory
/usr/bin/www-browser: line 149: /mnt/c/Windows/System32/chcp.com: No such file or directory
but works fine
It looks Fooocus maintainers are busy with other things.
I am wondering if you guys have any ideas?
Thanks
Hi MoonRide303,
This version is sooooooo cooooooool!
I like it so much for new feathers like the prompt information in png, and image 2 image
Well, after I modified the path-example.json and wishing to use sd 1.5 models and loras in fooocus-mre, it seems do not work well.
Like this :example, I changed the model to reacatoonanimeV4.safetensors, and same seed, same prompt( which is fairy girl) and same negative prompt, result is like this:
and the same setting on webui, the result is like this:
I'm not sure what's the problem, would you like to fix this issue?
Thank you so much : )
👍
Hello, thank you for everything you have done, so that we can get the picture soon. Can you tell me the specific parameters of various options of the sampler used in the original FOC? If I want to display its options as highlights (such as orange). Used to refer to the comparison and then gradually reduce the parameters to adjust the appropriate time, because how to do it? (The original FOC picture quality is very good is very slow, the keywords are not very strict, and I am not familiar with XL new sampler, the picture is easy to feel plastic) Thank you ~
Is it necessary to opt for the SDXL Refiner model? Can it be omitted from selection?
Exception in thread Thread-2 (worker):
Traceback (most recent call last):
File "threading.py", line 1016, in _bootstrap_inner
File "threading.py", line 953, in run
File "E:\Fooocus_win64_1-1-10\moonride-main\Fooocus\modules\async_worker.py", line 115, in worker
handler(task)
File "E:\Fooocus_win64_1-1-10\moonride-main\Fooocus\modules\async_worker.py", line 73, in handler
imgs = pipeline.process(p_txt, n_txt, steps, switch, width, height, seed, sampler_name, cfg, base_clip_skip, refiner_clip_skip, callback=callback)
File "E:\Fooocus_win64_1-1-10\python_embeded\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "E:\Fooocus_win64_1-1-10\moonride-main\Fooocus\modules\default_pipeline.py", line 127, in process
xl_refiner.clip.clip_layer(refiner_clip_skip)
AttributeError: 'NoneType' object has no attribute 'clip'
Got symbolic links working (thanks) but whenever Fooocus update, it deletes symbolic links and replace with actual folders and starts download missing safetensors. Link to Symbolic Link tutorial https://youtu.be/RDH5IuyPJtk
My current solution is hard code modules/path.py
Before
modelfile_path = os.path.abspath(os.path.join(os.path.dirname(file), '../models/checkpoints/'))
lorafile_path = os.path.abspath(os.path.join(os.path.dirname(file), '../models/loras/'))
After
modelfile_path = os.path.abspath(os.path.join(os.path.dirname(file), 'D:\stable-diffusion-shared\Ckpt\XL'))
lorafile_path = os.path.abspath(os.path.join(os.path.dirname(file), 'D:\stable-diffusion-shared\Lora\SDXL'))
Since Fooocus aims at matching mj's simplicity and popular functions, I am wondering if there is any plan to add outpainting in Fooocus/Foooocus-MRE.
Simple top, left, bottom, right outpainting with some default settings would be sufficient.
A good to have would be
An option to save settings like the resolution, style, batch and output as a default.
(for example, I need to select JPG with metadata and change the resolution every time), so that the next launch of the application, the same settings do not have to be applied again.
ComfyUI features two primary nodes for latent compositing: 'Latent Composite' and 'Latent Composite Masked'. These nodes offer enhanced control over image composition.
Additionally, GitHub user Davemane42 has provided custom nodes that feature an intuitive graphical representation of latent placement within the image.
https://github.com/Davemane42/ComfyUI_Dave_CustomNode
Is it feasible to integrate such a feature into Fooocus-MRE?
I understand that implementing this request might not be straightforward. However, it would be an extremely valuable feature, especially if users could interactively set up the image composition in the GUI by simply dragging and resizing the separate latent areas.
The supported official resolutions are very low resolution, so to get high resolution output without bad composition I tried to give 1920x1080px in resolutions to do img2img from low resolution to high.
But this doesn't work and there is no high res fix option as well so all the output images with such low resolution are not usefull at all unless i do img2img in A1111 with output of foocus.
That just wastes time and i would rather just use A1111 at that point.
There should be some way to to do from low res to high in Fooocus.
I had focus installed on server with --share
How can I see log.html file with gradio link?
Can we have someting like this - https://[4afc4f0bf5bbcf259.gradio.live/internal/log.html
After generating, click on the image and it will load in fullscreen in sort of a lightbox style. I always end up having to dig into the output folder, and then open them up to see the smaller details.
Would be awesome, while inspecting in fullscreen, one can reject/delete the image and auto advance to the next image
In the original repository maintained by Illyasviel, I submitted a feature request for an 'Abort Button' for image generation
(see Issue #85).
However, it appears that this request has since been overshadowed by 100+ subsequent issues. Would it be possible for this repository to consider implementing this feature?
Just starting to play with img2img and am so happy. Thank you
So far I only played with 2 sliders from the Advanced tab "Img2img Start Step" and "Img2img Denoise"
Also I want to as if you should make a "discussions" area on GitHub similar to what lllyasviel did here https://github.com/lllyasviel/Fooocus/discussions
I feel the "Issues" area should reserve for bug report.
I appreciate we now have this data in the PNG but having it printed to screen somewhere would also be useful, especially the seed and image dimensions.
BTW if I'm saturating you with requests please just say!
Storing the prompt data in a tag called 'prompt' is logical but it's a non-standard tag and image viewers don't see it. At least not Photoshop, Macos-Preview or XnView.
If you store the prompt data in a tag called name 'comment' it's immediately available.
Given that were talking about 1 kilobyte of data, could you alter your code to store it in both tags 'prompt' AND 'comment' ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.